/* * Copyright 2014 Donald Ray Crawford Jr. *  * This file is part of Oochis EHR. *  * Oochis EHR is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. *  * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. *  * You should have received a copy of the GNU General Public License * along with Oochis EHR.  If not, see <http://www.gnu.org/licenses/>. */package oochisCore;import java.awt.AWTException;import java.awt.CardLayout;import java.awt.Color;import java.awt.Component;import java.awt.Container;import java.awt.Dimension;import java.awt.Font;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.Image;import java.awt.Insets;import java.awt.Rectangle;import java.awt.Robot;import java.awt.Toolkit;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.AdjustmentEvent;import java.awt.event.AdjustmentListener;import java.awt.event.FocusEvent;import java.awt.event.FocusListener;import java.awt.event.KeyEvent;import java.awt.event.KeyListener;import java.awt.event.MouseEvent;import java.awt.image.BufferedImage;import java.awt.image.ImageObserver;import java.awt.print.PrinterJob;import java.io.IOException;import java.security.NoSuchAlgorithmException;import java.util.Calendar;import java.util.Date;import java.util.Vector;import javax.crypto.KeyGenerator;import javax.crypto.SecretKey;import javax.print.PrintService;import javax.swing.ImageIcon;import javax.swing.JButton;import javax.swing.JComponent;import javax.swing.JLabel;import javax.swing.JMenuBar;import javax.swing.JPanel;import javax.swing.JPopupMenu;import javax.swing.JRadioButton;import javax.swing.JScrollBar;import javax.swing.JScrollPane;import javax.swing.JTextArea;import javax.swing.JTextField;import javax.swing.JTextPane;import javax.swing.JToggleButton;import javax.swing.JViewport;import javax.swing.SwingConstants;import javax.swing.border.BevelBorder;import javax.swing.border.Border;import javax.swing.border.CompoundBorder;import javax.swing.border.LineBorder;import javax.swing.border.MatteBorder;import javax.swing.text.JTextComponent;public class ChartingWindow extends Window implements FocusListener, ActionListener, Cloneable, KeyListener {	Component focusLostDataCellDisplayObjectWithExtraDataToAddComponent;	String focusLostDataCellDisplayObjectWithExtraDataDatatype;	Calendar activeCalendar;	JPanel activeCalendarJPanel;	JTextField activeCalendarDayOfWeekJTextField;	JTextField activeCalendarMonthJTextField;	JTextField activeCalendarDayOfMonthJTextField;	JTextField activeCalendarYearJTextField;	JTextField activeCalendarHourJTextField;	JTextField activeCalendarMinuteJTextField;	JTextField activeCalendarAMPMJTextField;	Border promptToReplaceDataItemPopupMenuBorder = new CompoundBorder(new CompoundBorder(new BevelBorder(BevelBorder.RAISED), new LineBorder(Color.LIGHT_GRAY, 6)), new BevelBorder(BevelBorder.LOWERED));	JPopupMenu promptToReplaceDataItemJPopupMenu = new JPopupMenu();	Object focusLostBeforeChangeObject;	JLabel promptToReplaceDataItem1JLabel = new JLabel("Replace data?");	JLabel promptToReplaceDataItem2JLabel = new JLabel("(old data will still be stored and");	JLabel promptToReplaceDataItem3JLabel = new JLabel("viewable by right clicking the item)");	JButton promptToReplaceDataItemYesJButton = new JButton("Yes");	JButton promptToReplaceDataItemNoJButton = new JButton("No");	Font appointmentsAmPmTextFieldFontWhenDisplaying24HourTime = new Font("arial", Font.PLAIN, 9);	static String[] dayOfWeek = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };	static String[] month = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };	static String[] aMPM = { "AM", "PM" };	static String medicalCodeDatatype;	static String activityOrderFontType = "Electron";	int activityOrderFontSize = 14;	Dimension chartingWindowLocation = new Dimension(20, 20);	Dimension chartingWindowDimension = new Dimension(1060, 900);	JPanel chartsContentGlassCoverPanel = new JPanel(new GridBagLayout());	CardLayout chartFolderPanelBasePanelCardLayout = new CardLayout();	JPanel chartFolderPanelBaseJPanel = new JPanel(chartFolderPanelBasePanelCardLayout);	static Border popupBorder = new MatteBorder(1, 3, 3, 3, Color.BLACK);	String codeSetIdentifier;	static Vector<Vector<String>> codeSetVector = new Vector<Vector<String>>();	static Vector<Vector> medicalOutputFile;	Vector recentChartID = new Vector();	JScrollPane chartCoverJScrollPane = new JScrollPane(chartCoverPaneJPanel);	JScrollPane demographicsJScrollPane = new JScrollPane(demographicsPaneJPanel);	JScrollPane activitiesJScrollPane = new JScrollPane(activitiesPaneJPanel);	JScrollPane historyJScrollPane = new JScrollPane(historyPaneJPanel);	JScrollPane insuranceJScrollPane = new JScrollPane(insurancePaneJPanel);	static JButton chartCoverTabJButton = new JButton(" Chart cover ");	static JButton demographicsTabJButton = new JButton(" Demographics ");	static JButton activitiesTabJButton = new JButton(" Activities ");	static JButton historyTabJButton = new JButton(" History ");	static JButton insuranceTabJButton = new JButton(" Insurance ");	JPanel tabButtonsJPanel = new JPanel(new GridBagLayout());	static Color manilaColor = new Color(214, 203, 165);	static JButton newChartJButton = new JButton(" New chart ");	JPopupMenu newChartJPopupMenu = new JPopupMenu();	static JPanel templateChoicesJPanel = new JPanel(new GridBagLayout());	JScrollPane templateChoicesJScrollPane = new JScrollPane(templateChoicesJPanel);	static JPanel templateChoicesInnerJPanel = new JPanel(new GridBagLayout());	JPanel newChartJPanel = new JPanel(new GridBagLayout());	public boolean signOffAndProcessOnEntry = false;	Vector<String[]> itemsToSignAndProcess = new Vector<String[]>();	static String openChartID = null;	Vector chartIDClosed = new Vector();	JLabel patientPhotoLabel;	static JLabel page1PanelSection1JLabel;	JScrollBar hBar = new JScrollBar(JScrollBar.HORIZONTAL, 0, 5, 0, 100);	JScrollBar vBar = new JScrollBar(JScrollBar.VERTICAL, 0, 5, 0, 100);	static JTextArea[][][] chartDescriptionDisplayJTextArea;	JTextPane jTextPane = new JTextPane();	public static Object[][][] chartDataDisplayObject;	public static JPanel chartCoverJPanel = new JPanel(new GridBagLayout());	public static JPanel demographicsJPanel = new JPanel(new GridBagLayout());	public static JPanel activitiesJPanel = new JPanel(new GridBagLayout());	public static JPanel historyJPanel = new JPanel(new GridBagLayout());	public static JPanel insuranceJPanel = new JPanel(new GridBagLayout());	public static JPanel chartCoverPaneJPanel = new JPanel(new GridBagLayout());	public static JPanel demographicsPaneJPanel = new JPanel(new GridBagLayout());	public static JPanel activitiesPaneJPanel = new JPanel(new GridBagLayout());	public static JPanel historyPaneJPanel = new JPanel(new GridBagLayout());	public static JPanel insurancePaneJPanel = new JPanel(new GridBagLayout());	public static BufferedImage screenShot;	static JButton exportJButton = new JButton(" Export chart ");	JPopupMenu exportJPopupMenu = new JPopupMenu();	static JButton exportPdfJButton = new JButton(" *.pdf ");	static JButton exportHtmlJButton = new JButton(" *.html ");	static JButton exportHL7MessageJButton = new JButton(" Tab-deliminated HL7 message ");	static JButton exportNowJButton = new JButton(" Export ");	static JLabel exportPrintableDocumentJLabel = new JLabel(" Printable document: ");	PrintService[] exportService = PrinterJob.lookupPrintServices();	JPanel exportCoverButtonsJPanel = new JPanel(new GridBagLayout());	static JLabel exportCoverJLabel = new JLabel(" Chart cover: ");	static JLabel exportDemographicsJLabel = new JLabel(" Demographics: ");	static JLabel exportOrdersJLabel = new JLabel(" Activities: ");	static JLabel exportHistoryJLabel = new JLabel(" History: ");	static JLabel exportInsuranceJLabel = new JLabel(" Insurance: ");	static JRadioButton exportCoverYesJRadioButton = new JRadioButton(" Yes ");	static JRadioButton exportCoverNoJRadioButton = new JRadioButton(" No ");	static JLabel exportPanelHeaderJLabel1 = new JLabel(" Enter pages (e.g., 0, 3, 4 - 12, 4 to 12, all): ");	static JTextField exportDemographicsJTextField = new JTextField("all");	static JTextField exportOrdersJTextField = new JTextField("all");	static JTextField exportHistoryJTextField = new JTextField("all");	static JTextField exportInsuranceJTextField = new JTextField("all");	static JButton openChartJButton = new JButton(" Open chart ");	JPopupMenu openChartJPopupMenu = new JPopupMenu();	static JLabel openChartViaURLJLabel = new JLabel("URL: ");	static JLabel openChartViaChartIDJLabel = new JLabel("Chart ID: ");	static JTextField openChartViaURLJTextField = new JTextField(12);	static JTextField openChartViaChartIDJTextField = new JTextField(12);	static JLabel openChartViaPatientIdentifiersPatientNameJLabel = new JLabel("Patient name: ");	static JTextField openChartViaPatientIdentifiersPatientNameJTextField = new JTextField(12);	static JLabel openChartViaPatientIdentifiersPatientDriversLicenseJLabel = new JLabel("Driver's license: ");	static JTextField openChartViaPatientIdentifiersPatientDriversLicenseJTextField = new JTextField(12);	static JLabel openChartViaPatientIdentifiersPatientSocialSecurityJLabel = new JLabel("Social security: ");	static JTextField openChartViaPatientIdentifiersPatientSocialSecurityJTextField = new JTextField(12);	JPanel openChartViaRecentlyOpenedJPanel = new JPanel(new GridBagLayout());	JScrollPane openChartViaRecentlyOpenedJScrollPane = new JScrollPane(openChartViaRecentlyOpenedJPanel);	static JButton printJButton = new JButton(" Print ");	JPopupMenu printJPopupMenu = new JPopupMenu();	PrintService[] printService = PrinterJob.lookupPrintServices();	JPanel printCoverButtonsJPanel = new JPanel(new GridBagLayout());	static JLabel printCoverJLabel = new JLabel("Chart cover: ");	static JLabel printPanelHeaderJLabel1 = new JLabel("Enter pages");	static JRadioButton printCoverYesJRadioButton = new JRadioButton("Yes");	static JRadioButton printCoverNoJRadioButton = new JRadioButton("No");	static JLabel printDemographicsJLabel = new JLabel("Demographics: ");	static JLabel printActivitiesJLabel = new JLabel("Activities: ");	static JLabel printHistoryJLabel = new JLabel("History: ");	static JLabel printInsuranceJLabel = new JLabel("Insurance: ");	static JLabel printPanelHeaderJLabel2 = new JLabel("(e.g., 0, 3, 4 - 12, 4 to 12, all):");	static JTextField printDemographicsJTextField = new JTextField("all");	static JTextField printordersJTextField = new JTextField("all");	static JTextField printHistoryJTextField = new JTextField("all");	static JTextField printInsuranceJTextField = new JTextField("all");	static JButton printNowJButton = new JButton("Print.");	JPanel orderEntryBasePanelHeaderBaseJPanel = new JPanel(new GridBagLayout());	JPanel ordersPanelCodeSetButtonsBaseJPanel = new JPanel(new GridBagLayout());	JPanel prescriptionOrderJPanel = new JPanel(new GridBagLayout());	JPanel displayOrdersCardedBasePanelAddedJPanel = new JPanel(new GridBagLayout());	JLabel displayOrdersCardedBasePanelAddedJLabel = new JLabel("Added");	JPanel lOINCOrderJPanel = new JPanel(new GridBagLayout());	JPanel lOINCOrderPanelPusherJPanel = new JPanel(new GridBagLayout());	static JLabel specialCloseChartJLabel = new JLabel("Some chart additions have not been signed-off.");	static JPanel lOINCOrderPanelHeaderJPanel = new JPanel(new GridBagLayout());	static JLabel lOINCOrderPanelHeaderJLabel = new JLabel("Observation order:");	static JLabel lOINCOrderPanelMedicalCodeJLabel = new JLabel("");	static JLabel observationAxisComponentTitleJLabel = new JLabel("Component: ");	static JLabel observationAxisPropertyTitleJLabel = new JLabel("Property: ");	static JLabel observationAxisTimeAspectTitleJLabel = new JLabel("Time aspect: ");	static JLabel observationAxisSystemTitleJLabel = new JLabel("System: ");	static JLabel observationAxisScaletypeTitleJLabel = new JLabel("Scale type: ");	static JLabel observationAxisMethodTitleJLabel = new JLabel("Method: ");	static JTextArea diagnosticJTextArea = new JTextArea();	static JPanel diagnosticTextAreaJPanel = new JPanel(new GridBagLayout());	static JPanel diagnosticOrderJPanel = new JPanel(new GridBagLayout());	static JLabel diagnosticOrderPanelHeaderJLabel = new JLabel("Diagnostic order:");	static JPanel diagnosticOrderPanelPusherJPanel = new JPanel(new GridBagLayout());	static JTextArea proceduralJTextArea = new JTextArea();	static JPanel proceduralTextAreaJPanel = new JPanel(new GridBagLayout());	static JPanel proceduralOrderJPanel = new JPanel(new GridBagLayout());	static JLabel proceduralOrderPanelHeaderJLabel = new JLabel("Procedural order:");	static JPanel proceduralOrderPanelPusherJPanel = new JPanel(new GridBagLayout());	static JTextArea observationAxisComponentContentJTextArea = new JTextArea();	static JPanel observationAxisComponentContentTextAreaJPanel = new JPanel(new GridBagLayout());	static JLabel observationAxisPropertyContentJLabel = new JLabel();	static JLabel observationAxisTimeAspectContentJLabel = new JLabel();	static JLabel observationAxisSystemContentJLabel = new JLabel();	static JLabel observationAxisScaletypeContentJLabel = new JLabel();	static JLabel observationAxisMethodContentJLabel = new JLabel();	CardLayout displayOrdersCardLayout = new CardLayout();	JPanel displayOrdersCardedJPanel = new JPanel(displayOrdersCardLayout);	JPanel displayOrdersCardedPanelBaseJPanel = new JPanel(new GridBagLayout());	JPanel displayOrdersCardedPanelBlankJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryOkButtonsJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryPanelBaseJPanel = new JPanel(new GridBagLayout());	JPanel prescriptionOrderHeaderJPanel = new JPanel(new GridBagLayout());	static JLabel prescriptionOrderOrderingPhysicianContentJLabel = new JLabel("Dr. Christopher H Loren, MD");	static JLabel prescriptionOrderHeaderFacilityIdentifierJLabel = new JLabel("City Clinic 01");	static JLabel prescriptionOrderFacilityAddressJLabel = new JLabel("123 North Main St. Columbus OHIO  01234");	static JLabel prescriptionOrderProvidorPhoneContentJLabel = new JLabel("Ph. 123 456 7890");	static JLabel prescriptionOrderProvidorFaxContentJLabel = new JLabel("Fax: 234 567 8910");	static JLabel prescriptionOrderProvidorRxSymbolJLabel = new JLabel("Rx");	JPanel prescriptionOrderDrugJPanel = new JPanel(new GridBagLayout());	JPanel prescriptionOrderDispenseJPanel = new JPanel(new GridBagLayout());	JPanel prescriptionOrderSignatureJPanel = new JPanel(new GridBagLayout());	JPanel prescriptionOrderRefillsAndVoidDateJPanel = new JPanel(new GridBagLayout());	JPanel prescriptionOrderAlertJPanel = new JPanel(new GridBagLayout());	JPanel prescriptionOrderCommentJPanel = new JPanel(new GridBagLayout());	JPanel prescriptionOrderDispenseAsWrittenAndPatientReportedJPanel = new JPanel(new GridBagLayout());	JPanel prescriptionOrderPharmacyJPanel = new JPanel(new GridBagLayout());	static Font smallOrderEntryFont = new Font("Electron", Font.PLAIN, 10);	static JPanel prescriptionOrderPromptDrugJPanel = new JPanel(new GridBagLayout());	static JLabel prescriptionOrderPanelMedicalCodeJLabel = new JLabel("");	static JLabel prescriptionOrderPromptDrugJLabel = new JLabel("Drug: ");	static JTextArea prescriptionOrderDrugJTextArea = new JTextArea();	static JPanel prescriptionOrderDrugTextAreaJPanel = new JPanel();	static JLabel prescriptionOrderPromptDispenseJLabel = new JLabel("Dispense: ");	static JTextField prescriptionOrderDispenseJTextField = new JTextField();	static JLabel prescriptionOrderPromptSignatureJLabel = new JLabel("Signature: ");	static JTextField prescriptionOrderSignatureJTextField = new JTextField();	static JLabel prescriptionOrderPromptRefillsJLabel = new JLabel("Refills: ");	static JTextField prescriptionOrderRefillsJTextField = new JTextField(5);	static JLabel prescriptionOrderPromptVoidDateJLabel = new JLabel("Void date: ");	static JTextField prescriptionOrderVoidDateJTextField = new JTextField();	static JLabel prescriptionOrderPromptAlertJLabel = new JLabel("Alert: ");	static JTextField prescriptionOrderAlertJTextField = new JTextField();	static JLabel prescriptionOrderPromptCommentJLabel = new JLabel("Comment: ");	static JTextField prescriptionOrderCommentJTextField = new JTextField();	static JLabel prescriptionOrderPromptDispenseAsWrittenJLabel = new JLabel("Dispense as written: ");	static JRadioButton prescriptionOrderDispenseAsWrittenYesJRadioButton = new JRadioButton("Yes");	static JRadioButton prescriptionOrderDispenseAsWrittenNoJRadioButton = new JRadioButton("No");	static JLabel prescriptionOrderPromptPatientReportedJLabel = new JLabel("Pt. reported: ");	static JRadioButton prescriptionOrderPatientReportedYesJRadioButton = new JRadioButton("Yes");	static JRadioButton prescriptionOrderPatientReportedNoJRadioButton = new JRadioButton("No");	static JLabel prescriptionOrderPromptPharmacyJLabel = new JLabel("Pharmacy: ");	static JTextField prescriptionOrderPharmacyJTextField = new JTextField();	static JButton orderEntryPlaceOrderJButton = new JButton(" Place order ");	static JButton orderEntryScheduleAndBatchOrderJButton = new JButton(" Schedule/batch order ");	JPopupMenu orderEntryScheduleAndBatchOrderJPopupMenu = new JPopupMenu(" Schedule/batch order ");	JPanel orderEntryScheduleAndBatchOrderJPanel = new JPanel(new GridBagLayout());	static JLabel orderEntryScheduleAndBatchOrderAtTimeJLabel = new JLabel("Order at ");	static JTextField orderEntryScheduleAndBatchOrderAtTimeJTextField = new JTextField();	static JButton orderEntryScheduleAndBatchOrderAtTimeJButton = new JButton(" order at ");	static JLabel orderEntryScheduleAndBatchOrderOnDateJLabel = new JLabel(" on ");	static JTextField orderEntryScheduleAndBatchOrderOnDateJTextField = new JTextField();	static JButton orderEntryScheduleAndBatchOrderOnDateJButton = new JButton(" order on ");	JPopupMenu orderEntryScheduleAndBatchOrderAtTimeJPopupMenu = new JPopupMenu();	JPopupMenu orderEntryScheduleAndBatchOrderOnDateJPopupMenu = new JPopupMenu();	JPanel orderEntryHeaderPatientNameJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryHeaderPatientAddressJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryHeaderPatientPhoneJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryHeaderHealthRecordJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryHeaderPatientAgeJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryHeaderPatientSexJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryHeaderProviderJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryHeaderPayorJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryPanelHeaderJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryPanelCodeSetButtonsJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryCodeChoicesJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryCodeChoicesScrollPaneJPanel = new JPanel(new GridBagLayout());	JScrollPane orderEntryCodeChoicesJScrollPane = new JScrollPane(orderEntryCodeChoicesJPanel);	static JLabel cPTOrderEntryCodeSetJLabel = new JLabel("Code set: CPT 2009");	static JLabel cPTContentsPromptJLabel = new JLabel("CPT contents: ");	static JLabel cPTCodePromptJLabel = new JLabel("CPT code: ");	static JTextField cPTContentsQueryJTextField = new JTextField();	static JTextField cPTCodeQueryJTextField = new JTextField();	static JLabel iCDOrderEntryCodeSetJLabel = new JLabel("Code set: ICD-10");	static JLabel iCDContentsPromptJLabel = new JLabel("ICD contents:");	static JLabel iCDCodePromptJLabel = new JLabel("ICD code:");	static JTextField iCDContentsQueryJTextField = new JTextField();	static JTextField iCDCodeQueryJTextField = new JTextField();	static JLabel lOINCOrderEntryCodeSetJLabel = new JLabel("Code set: LOINC");	static JLabel lOINCContentsPromptJLabel = new JLabel("LOINC contents: ");	static JLabel lOINCCodePromptJLabel = new JLabel("LOINC code: ");	static JTextField lOINCContentsQueryJTextField = new JTextField();	static JTextField lOINCCodeQueryJTextField = new JTextField();	static JLabel rXNormOrderEntryCodeSetJLabel = new JLabel("Code set: RxNorm");	static JLabel rXNormContentsPromptJLabel = new JLabel("RxNorm contents: ");	static JLabel rXNormCodePromptJLabel = new JLabel("RxNorm code: ");	static JTextField rXNormContentsQueryJTextField = new JTextField();	static JTextField rXNormCodeQueryJTextField = new JTextField();	static JLabel hCPCS1OrderEntryCodeSetJLabel = new JLabel("Code set: HCPCS level 1");	static JLabel hCPCS1ContentsPromptJLabel = new JLabel("HCPCS1 content: ");	static JLabel hCPCS1CodeQueryJLabel = new JLabel("HCPCS1 code: ");	static JTextField hCPCS1ContentsQueryJTextField = new JTextField();	static JTextField hCPCS1CodeQueryJTextField = new JTextField();	static JLabel hCPCS2OrderEntryCodeSetJLabel = new JLabel("Code set: HCPCS level 2");	static JLabel hCPCS2ContentsPromptJLabel = new JLabel("Ar: ");	static JLabel hCPCS2CodePromptJLabel = new JLabel("Ar: ");	static JTextField hCPCS2ContentsQueryJTextField = new JTextField();	static JTextField hCPCS2CodeQueryJTextField = new JTextField();	CardLayout codeInputTopCardLayout = new CardLayout();	JPanel codeInputBaseJPanel = new JPanel(new GridBagLayout());	JPanel codeInputCardedJPanel = new JPanel(codeInputTopCardLayout);	JPanel codeInputTopCardedPanelBlankJPanel = new JPanel(new GridBagLayout());	JPanel cPTCodeEntryJPanel = new JPanel(new GridBagLayout());	JPanel iCDCodeEntryJPanel = new JPanel(new GridBagLayout());	JPanel lOINCCodeEntryJPanel = new JPanel(new GridBagLayout());	JPanel hCPCS1CodeEntryJPanel = new JPanel(new GridBagLayout());	JPanel hCPCS2CodeEntryJPanel = new JPanel(new GridBagLayout());	JPanel rXNormCodeEntryJPanel = new JPanel(new GridBagLayout());	CardLayout orderEntryBottomCardLayout = new CardLayout();	JPanel orderEntryBottomCardedJPanel = new JPanel(orderEntryBottomCardLayout);	JPopupMenu orderEntryCodeDetailsJPopupMenu = new JPopupMenu();	static JButton orderEntryCodeDetailsPopupMenuJButton = new JButton("   Code details   ");	JPanel orderEntryCodeDetailsPopupMenuButtonBaseJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryBottomCardedPanelBlankJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryBottomCardedPanelScheduleOrderJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryBottomCardedPanelPlaceOrderJPanel = new JPanel(new GridBagLayout());	JPanel orderEntryBottomCardedPanelOrderSetsJPanel = new JPanel(new GridBagLayout());	JScrollPane orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane = new JScrollPane(orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel);	JScrollPane orderEntryBottomCardedPanelOrderSetsPanelJScrollPane = new JScrollPane(orderEntryBottomCardedPanelOrderSetsJPanel);	static JLabel ordersPanelHeaderPatientNameDescriptionJLabel = new JLabel("Name: ");	static JLabel ordersPanelHeaderPatientAddressDescriptionJLabel = new JLabel("Address: ");	static JLabel ordersPanelHeaderPatientPhoneDescriptionJLabel = new JLabel("Phone: ");	static JLabel ordersPanelHeaderPatientBirthTimeAndDateDescriptionJLabel = new JLabel("Birth date: ");	static JLabel ordersPanelHealthRecordDescriptionJLabel = new JLabel("Health record: ");	static JLabel ordersPanelHeaderPayorDescriptionJLabel = new JLabel("Payor: ");	static JLabel ordersPanelHeaderProviderDescriptionJLabel = new JLabel("Provider: ");	static JLabel ordersPanelHeaderPatientSexDescriptionJLabel = new JLabel("Patient sex: ");	static JLabel ordersPanelHeaderPatientNameOutputJLabel = new JLabel();	static JLabel ordersPanelHeaderPatientAddressOutputJLabel = new JLabel();	static JLabel ordersPanelHeaderPatientPhoneOutputJLabel = new JLabel();	static JLabel ordersPanelHeaderPatientBirthTimeAndDateOutputJLabel = new JLabel();	static JLabel ordersPanelHealthRecordOutputJLabel = new JLabel();	static JLabel ordersPanelHeaderPayorOutputJLabel = new JLabel();	static JLabel ordersPanelHeaderProviderOutputJLabel = new JLabel();	static JLabel ordersPanelHeaderPatientSexOutputJLabel = new JLabel();	JPanel orderEntryBottomCardedPanelCPTPanelScrollPaneColumnHeaderJPanel = new JPanel(new GridBagLayout());	JLabel orderEntryBottomCardedPanelCPTPanelScrollPaneColumnHeaderJLabel1 = new JLabel("CPT code:   Test name:");	JPanel orderEntryBottomCardedPanelICDPanelScrollPaneColumnHeaderJPanel = new JPanel(new GridBagLayout());	JLabel orderEntryBottomCardedPanelICDPanelScrollPaneColumnHeaderJLabel1 = new JLabel("ICD code:   Description:");	JPanel orderEntryBottomCardedPanelLOINCPanelScrollPaneColumnHeaderJPanel = new JPanel(new GridBagLayout());	JLabel orderEntryBottomCardedPanelLOINCPanelScrollPaneColumnHeaderJLabel1 = new JLabel("LOINC code:    Blah:");	JPanel orderEntryBottomCardedPanelHCPCS1PanelScrollPaneColumnHeaderJPanel = new JPanel(new GridBagLayout());	JLabel orderEntryBottomCardedPanelHCPCS1PanelScrollPaneColumnHeaderJLabel1 = new JLabel("HCPCS1 code:  Blah:");	JPanel orderEntryBottomCardedPanelHCPCS2PanelScrollPaneColumnHeaderJPanel = new JPanel(new GridBagLayout());	JLabel orderEntryBottomCardedPanelHCPCS2PanelScrollPaneColumnHeaderJLabel1 = new JLabel("HCPCS2 code:  Blah:");	JPanel orderEntryBottomCardedPanelRxNormPanelScrollPaneColumnHeaderJPanel = new JPanel(new GridBagLayout());	JLabel orderEntryBottomCardedPanelRxNormPanelScrollPaneColumnHeaderJLabel1 = new JLabel("RxNorm (RXNCONSO09072010)");	JButton addPrescriptionJButton = new JButton("Add prescription");	JButton amendPrescriptionJButton = new JButton("Amend prescription");	static JToggleButton cPTJToggleButton = new JToggleButton();	static JToggleButton iCDJToggleButton = new JToggleButton();	static JToggleButton lOINCJToggleButton = new JToggleButton();	static JToggleButton hCPCS1JToggleButton = new JToggleButton();	static JToggleButton hCPCS2JToggleButton = new JToggleButton();	static JToggleButton orderSetsJToggleButton = new JToggleButton();	static JToggleButton rXNormJToggleButton = new JToggleButton();	static JLabel cPTToggleButtonJLabel1 = new JLabel("  Procedural  ");	static JLabel iCDToggleButtonJLabel1 = new JLabel("  Diagnostic  ");	static JLabel lOINCToggleButtonJLabel1 = new JLabel(" Observations/labs ");	static JLabel hCPCS1ToggleButtonJLabel1 = new JLabel("  HCPCS1  ");	static JLabel hCPCS2ToggleButtonJLabel1 = new JLabel("  HCPCS2  ");	static JLabel orderSetsToggleButtonJLabel1 = new JLabel("  Order sets  ");	static JLabel rXNormToggleButtonJLabel1 = new JLabel("  Biologicals  ");	static JLabel cPTToggleButtonJLabel2 = new JLabel(" CPT 2009 ");	static JLabel iCDToggleButtonJLabel2 = new JLabel(" ICD-10 ");	static JLabel lOINCToggleButtonJLabel2 = new JLabel(" LOINC 2.32 ");	static JLabel hCPCS1ToggleButtonJLabel2 = new JLabel("   ");	static JLabel hCPCS2ToggleButtonJLabel2 = new JLabel("   ");	static JLabel orderSetsToggleButtonJLabel2 = new JLabel("   ");	static JLabel rXNormToggleButtonJLabel2 = new JLabel(" RxNorm 9/7/2010 ");	static JButton signOffJButton = new JButton(" Sign off and process ");	static JButton closeChartJButton = new JButton(" Close chart ");	JPopupMenu closingPromptJPopupMenu = new JPopupMenu();	static JButton closeChartSignoffAndCloseJButton = new JButton(" Sign off and close chart. ");	static JButton closeChartWithoutSigningOffJButton = new JButton(" Close chart without signing-off. ");	static JButton closeChartToggleThroughUnsignedFieldsJButton = new JButton(" Toggle through unsigned fields ");	static JButton closeChartToggleThroughUnprocessedFieldsJButton = new JButton(" Toggle through unprocessed fields ");	static JButton notePadJButton = new JButton(" Note pad ");	static JButton summaryAndDischargePapersJButton = new JButton(" Summary and discharge ");	static JButton findJButton = new JButton(" Find ");	boolean focusGained;	boolean needSignOff = false;	static boolean chartIsOpen = false;	static JMenuBar menuBar = new JMenuBar();	CardLayout tabCardLayout = new CardLayout();	JPanel cardedChartContentJPanel = new JPanel(tabCardLayout);	JPanel chartFolderJPanel = new JPanel(new GridBagLayout());	JPanel noChartJPanel = new JPanel(new GridBagLayout());	ImageIcon coverOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(9));	ImageIcon coverClosedRightOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(8));	ImageIcon coverClosedRightClosedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(7));	ImageIcon demographicsOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(14));	ImageIcon demographicsClosedRightOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(13));	ImageIcon demographicsClosedLeftOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(12));	ImageIcon demographicsClosedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(11));	ImageIcon ordersOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(38));	ImageIcon ordersClosedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(35));	ImageIcon ordersClosedRightOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(37));	ImageIcon ordersClosedLeftOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(36));	ImageIcon historyClosedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(35));	ImageIcon historyClosedRightOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(19));	ImageIcon historyClosedLeftOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(18));	ImageIcon historyOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(20));	ImageIcon insuranceOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(23));	ImageIcon insuranceClosedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(21));	ImageIcon insuranceClosedLeftOpenedImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(22));	ImageIcon userTabImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(39));	ImageIcon newUserTabImageIcon = new ImageIcon((byte[]) Device.imagesVector.elementAt(39));	JPanel chartShortcutTabsJPanel = new JPanel(new GridBagLayout());	JLabel shortcutTabCommentJLabel = new JLabel("Tab comment:");	JScrollPane chartShortcutTabsPanelJScrollPane = new JScrollPane(chartShortcutTabsJPanel);	JPanel chartShortcutTabsInnerJPanel = new JPanel(new GridBagLayout());	JTextField shortcutTabNameJTextField = new JTextField();	JLabel shortcutTabNameJLabel = new JLabel();	JButton chartShortcutTabsJButton = new JButton(userTabImageIcon);	JToggleButton viewMedicalFormsDetailsJToggleButton = new JToggleButton("Forms / Detailed pages");	JPopupMenu shortcutTabJPopupMenu = new JPopupMenu();	static int focusLostChartSection = -2;	static int focusLostPageNumber = -2;	static int focusLostItemNumber = -2;	GridBagConstraints promptToReplaceDataItemPopupMenuConstraints = new GridBagConstraints();	GridBagConstraints lOINCOrderPanelHeaderPanelConstraints = new GridBagConstraints();	GridBagConstraints prescriptionOrderPromptDrugPanelConstraints = new GridBagConstraints();	GridBagConstraints chartShortcutTabsPanelConstraints = new GridBagConstraints();	GridBagConstraints orderEntryButtonsPanelConstraints = new GridBagConstraints();	GridBagConstraints ordersChoiceCodeDetailsPanelConstraints = new GridBagConstraints();	GridBagConstraints cPTIdentifiersInputPanelConstraints = new GridBagConstraints();	GridBagConstraints openPreviouslyClosedChartsPanelConstraints = new GridBagConstraints();	GridBagConstraints openChartViaRecentlyOpenedPanelConstraints = new GridBagConstraints();	GridBagConstraints openChartPopupMenuConstraints = new GridBagConstraints();	GridBagConstraints previousCellDataInformationPanelConstraints = new GridBagConstraints();	GridBagConstraints newChartBasePanelConstraints = new GridBagConstraints();	GridBagConstraints exportPopupMenuConstraints = new GridBagConstraints();	GridBagConstraints exportCoverButtonsPanelConstraints = new GridBagConstraints();	GridBagConstraints printPopupMenuConstraints = new GridBagConstraints();	GridBagConstraints printCoverButtonsPanelConstraints = new GridBagConstraints();	GridBagConstraints topButtonsPanelConstraints = new GridBagConstraints();	GridBagConstraints chartFolderPanelConstraints = new GridBagConstraints();	GridBagConstraints closingPromptPopupMenuConstraints = new GridBagConstraints();	GridBagConstraints orderEntryCodeChoicePanelConstraints = new GridBagConstraints();	GridBagConstraints orderEntryCodeChoicesDetailsInnerPanelConstraints = new GridBagConstraints();	GridBagConstraints orderEntryPanelLabelAndTextFieldConstraints = new GridBagConstraints();	GridBagConstraints ordersChoiceMedicalCodeConstraints = new GridBagConstraints();	GridBagConstraints orderEntryCodeChoicesColumnHeaderConstraints = new GridBagConstraints();	GridBagConstraints RxNormPanelConstraints = new GridBagConstraints();	GridBagConstraints orderEntryPanelGridBagConstraints = new GridBagConstraints();	GridBagConstraints orderEntryScheduleOrderPanelConstraints = new GridBagConstraints();	GridBagConstraints orderEntryOrderSetsPanelConstraints = new GridBagConstraints();	GridBagConstraints orderEntryBottomCardedPanelConstraints = new GridBagConstraints();	GridBagConstraints prescriptionOrderPanelConstraints = new GridBagConstraints();	GridBagConstraints lOINCOrderPanelConstraints = new GridBagConstraints();	GridBagConstraints orderEntryToggleButtonConstraints = new GridBagConstraints();	GridBagConstraints ordersPanelCodeSetButtonsBasePanelConstraints = new GridBagConstraints();	GridBagConstraints orderEntryBasePanelHeaderBasePanelConstraints = new GridBagConstraints();	GridBagConstraints codeInputBasePanelConstraints = new GridBagConstraints();	GridBagConstraints prescriptionOrderHeaderPanelConstraints = new GridBagConstraints();	GridBagConstraints prescriptionOrderPanelsConstraints = new GridBagConstraints();	GridBagConstraints diagnosticOrderPanelConstraints = new GridBagConstraints();	GridBagConstraints proceduralOrderPanelConstraints = new GridBagConstraints();	GridBagConstraints orderEntryCodeChoicesScrollPaneConstraints = new GridBagConstraints();	GridBagConstraints orderEntryCodeDetailsPopupMenuButtonBasePanelConstraints = new GridBagConstraints();	GridBagConstraints prescriptionOrderDrugTextAreaPanelConstraints = new GridBagConstraints();	GridBagConstraints observationAxisComponentContentTextAreaPanelConstraints = new GridBagConstraints();	GridBagConstraints proceduralTextAreaPanelConstraints = new GridBagConstraints();	GridBagConstraints diagnosticTextAreaPanelConstraints = new GridBagConstraints();	GridBagConstraints displayOrdersCardedPanelBasePanelConstraints = new GridBagConstraints();	GridBagConstraints templateChoicesPanelConstraints = new GridBagConstraints();	GridBagConstraints orderEntryScheduleAndBatchOrderPanelConstraints = new GridBagConstraints();	GridBagConstraints contentPanelConstraints = new GridBagConstraints();	Font toggleButtonJLabel2Font = new Font("Electron", Font.BOLD, 12);	static Color importantFieldHighlightColor = new Color(200, 240, 200);	Color unsignedFieldVeryLightGrayColor = new Color(230, 230, 230);	Color unprocessedFieldHighlightColor = new Color(249, 249, 186);	Color processingFailedFieldHighlightColor = new Color(255, 128, 128);	Color signOffButtonEnabledColor = unprocessedFieldHighlightColor;	ChartingWindow() {		setLocation(chartingWindowLocation.width, chartingWindowLocation.height);		titleBarJLabel.setText("Charting  -  Oochis EHR");		addTalkbackText("Charting  -  Oochis EHR", null, false);		demographicsJPanel.setName("demographicsJPanel");		chartCoverJPanel.setBackground(manilaColor);		demographicsJPanel.setBackground(manilaColor);		activitiesJPanel.setBackground(manilaColor);		historyJPanel.setBackground(manilaColor);		insuranceJPanel.setBackground(manilaColor);		chartCoverPaneJPanel.setBackground(manilaColor);		demographicsPaneJPanel.setBackground(manilaColor);		activitiesPaneJPanel.setBackground(manilaColor);		historyPaneJPanel.setBackground(manilaColor);		insurancePaneJPanel.setBackground(manilaColor);		chartCoverPaneJPanel.setBorder(new MatteBorder(0, 2, 0, 0, Color.WHITE));		demographicsPaneJPanel.setBorder(new MatteBorder(0, 2, 0, 0, Color.WHITE));		activitiesPaneJPanel.setBorder(new MatteBorder(0, 2, 0, 0, Color.WHITE));		historyPaneJPanel.setBorder(new MatteBorder(0, 2, 0, 0, Color.WHITE));		insurancePaneJPanel.setBorder(new MatteBorder(0, 2, 0, 0, Color.WHITE));		chartCoverPaneJPanel.setOpaque(true);		demographicsPaneJPanel.setOpaque(true);		activitiesPaneJPanel.setOpaque(true);		historyPaneJPanel.setOpaque(true);		insurancePaneJPanel.setOpaque(true);		orderEntryCodeChoicesColumnHeaderConstraints.weightx = 1;		orderEntryCodeChoicesColumnHeaderConstraints.anchor = GridBagConstraints.WEST;		orderEntryCodeChoicesColumnHeaderConstraints.gridx = 0;		orderEntryCodeChoicesColumnHeaderConstraints.insets = new Insets(0, 6, 0, 6);		orderEntryBottomCardedPanelCPTPanelScrollPaneColumnHeaderJPanel.add(orderEntryBottomCardedPanelCPTPanelScrollPaneColumnHeaderJLabel1, orderEntryCodeChoicesColumnHeaderConstraints);		orderEntryBottomCardedPanelICDPanelScrollPaneColumnHeaderJPanel.add(orderEntryBottomCardedPanelICDPanelScrollPaneColumnHeaderJLabel1, orderEntryCodeChoicesColumnHeaderConstraints);		orderEntryBottomCardedPanelLOINCPanelScrollPaneColumnHeaderJPanel.add(orderEntryBottomCardedPanelLOINCPanelScrollPaneColumnHeaderJLabel1, orderEntryCodeChoicesColumnHeaderConstraints);		orderEntryBottomCardedPanelHCPCS1PanelScrollPaneColumnHeaderJPanel.add(orderEntryBottomCardedPanelHCPCS1PanelScrollPaneColumnHeaderJLabel1, orderEntryCodeChoicesColumnHeaderConstraints);		orderEntryBottomCardedPanelHCPCS2PanelScrollPaneColumnHeaderJPanel.add(orderEntryBottomCardedPanelHCPCS2PanelScrollPaneColumnHeaderJLabel1, orderEntryCodeChoicesColumnHeaderConstraints);		orderEntryBottomCardedPanelRxNormPanelScrollPaneColumnHeaderJPanel.add(orderEntryBottomCardedPanelRxNormPanelScrollPaneColumnHeaderJLabel1, orderEntryCodeChoicesColumnHeaderConstraints);		cPTJToggleButton.setLayout(new GridBagLayout());		cPTJToggleButton.setFont(new Font("arial", Font.BOLD, 15));		cPTJToggleButton.setFocusPainted(false);		cPTJToggleButton.setMnemonic('C');		cPTJToggleButton.addActionListener(this);		cPTJToggleButton.setActionCommand("cPTJToggleButton");		iCDJToggleButton.setLayout(new GridBagLayout());		iCDJToggleButton.setFont(new Font("arial", Font.BOLD, 15));		iCDJToggleButton.setFocusPainted(false);		iCDJToggleButton.setMnemonic('I');		iCDJToggleButton.addActionListener(this);		iCDJToggleButton.setActionCommand("iCDJToggleButton");		lOINCJToggleButton.setLayout(new GridBagLayout());		lOINCJToggleButton.setFont(new Font("arial", Font.BOLD, 15));		lOINCJToggleButton.setFocusPainted(false);		lOINCJToggleButton.setMnemonic('L');		lOINCJToggleButton.addActionListener(this);		lOINCJToggleButton.setActionCommand("lOINCJToggleButton");		hCPCS1JToggleButton.setLayout(new GridBagLayout());		hCPCS1JToggleButton.setFont(new Font("arial", Font.BOLD, 15));		hCPCS1JToggleButton.setFocusPainted(false);		hCPCS1JToggleButton.setMnemonic('1');		hCPCS1JToggleButton.addActionListener(this);		hCPCS1JToggleButton.setActionCommand("hCPCS1JToggleButton");		hCPCS2JToggleButton.setLayout(new GridBagLayout());		hCPCS2JToggleButton.setFont(new Font("arial", Font.BOLD, 15));		hCPCS2JToggleButton.setFocusPainted(false);		hCPCS2JToggleButton.setMnemonic('2');		hCPCS2JToggleButton.addActionListener(this);		hCPCS2JToggleButton.setActionCommand("hCPCS2JToggleButton");		rXNormJToggleButton.setLayout(new GridBagLayout());		rXNormJToggleButton.setFont(new Font("arial", Font.BOLD, 15));		rXNormJToggleButton.setFocusPainted(false);		rXNormJToggleButton.setMnemonic('X');		rXNormJToggleButton.addActionListener(this);		rXNormJToggleButton.setActionCommand("rXNormJToggleButton");		orderSetsJToggleButton.setLayout(new GridBagLayout());		orderSetsJToggleButton.setFont(new Font("arial", Font.BOLD, 15));		orderSetsJToggleButton.setFocusPainted(false);		orderSetsJToggleButton.setMnemonic('2');		orderSetsJToggleButton.addActionListener(this);		orderSetsJToggleButton.setActionCommand("orderSetsJToggleButton");		cPTToggleButtonJLabel2.setFont(toggleButtonJLabel2Font);		iCDToggleButtonJLabel2.setFont(toggleButtonJLabel2Font);		lOINCToggleButtonJLabel2.setFont(toggleButtonJLabel2Font);		hCPCS1ToggleButtonJLabel2.setFont(toggleButtonJLabel2Font);		hCPCS1ToggleButtonJLabel2.setFont(toggleButtonJLabel2Font);		rXNormToggleButtonJLabel2.setFont(toggleButtonJLabel2Font);		orderSetsToggleButtonJLabel2.setFont(toggleButtonJLabel2Font);		orderEntryToggleButtonConstraints.gridy = 0;		cPTJToggleButton.add(cPTToggleButtonJLabel1, orderEntryToggleButtonConstraints);		iCDJToggleButton.add(iCDToggleButtonJLabel1, orderEntryToggleButtonConstraints);		lOINCJToggleButton.add(lOINCToggleButtonJLabel1, orderEntryToggleButtonConstraints);		hCPCS1JToggleButton.add(hCPCS1ToggleButtonJLabel1, orderEntryToggleButtonConstraints);		hCPCS1JToggleButton.add(hCPCS1ToggleButtonJLabel1, orderEntryToggleButtonConstraints);		rXNormJToggleButton.add(rXNormToggleButtonJLabel1, orderEntryToggleButtonConstraints);		orderSetsJToggleButton.add(orderSetsToggleButtonJLabel1, orderEntryToggleButtonConstraints);		orderEntryToggleButtonConstraints.gridy = 1;		cPTJToggleButton.add(cPTToggleButtonJLabel2, orderEntryToggleButtonConstraints);		iCDJToggleButton.add(iCDToggleButtonJLabel2, orderEntryToggleButtonConstraints);		lOINCJToggleButton.add(lOINCToggleButtonJLabel2, orderEntryToggleButtonConstraints);		hCPCS1JToggleButton.add(hCPCS1ToggleButtonJLabel2, orderEntryToggleButtonConstraints);		hCPCS1JToggleButton.add(hCPCS1ToggleButtonJLabel2, orderEntryToggleButtonConstraints);		rXNormJToggleButton.add(rXNormToggleButtonJLabel2, orderEntryToggleButtonConstraints);		orderSetsJToggleButton.add(orderSetsToggleButtonJLabel2, orderEntryToggleButtonConstraints);		ordersChoiceMedicalCodeConstraints.weighty = 1;		ordersChoiceMedicalCodeConstraints.weightx = 1;		ordersChoiceMedicalCodeConstraints.fill = GridBagConstraints.BOTH;		ordersChoiceMedicalCodeConstraints.insets = new Insets(6, 6, 6, 3);		orderEntryPanelCodeSetButtonsJPanel.add(lOINCJToggleButton, ordersChoiceMedicalCodeConstraints);		ordersChoiceMedicalCodeConstraints.gridx = 1;		ordersChoiceMedicalCodeConstraints.insets = new Insets(6, 3, 6, 3);		orderEntryPanelCodeSetButtonsJPanel.add(iCDJToggleButton, ordersChoiceMedicalCodeConstraints);		ordersChoiceMedicalCodeConstraints.gridx = 2;		orderEntryPanelCodeSetButtonsJPanel.add(rXNormJToggleButton, ordersChoiceMedicalCodeConstraints);		ordersChoiceMedicalCodeConstraints.gridx = 3;		orderEntryPanelCodeSetButtonsJPanel.add(cPTJToggleButton, ordersChoiceMedicalCodeConstraints);		ordersChoiceMedicalCodeConstraints.gridx = 4;		orderEntryPanelCodeSetButtonsJPanel.add(orderSetsJToggleButton, ordersChoiceMedicalCodeConstraints);		ordersChoiceMedicalCodeConstraints.gridx = 5;		orderEntryPanelCodeSetButtonsJPanel.add(hCPCS1JToggleButton, ordersChoiceMedicalCodeConstraints);		ordersChoiceMedicalCodeConstraints.gridx = 6;		ordersChoiceMedicalCodeConstraints.insets = new Insets(6, 3, 6, 6);		orderEntryPanelCodeSetButtonsJPanel.add(hCPCS2JToggleButton, ordersChoiceMedicalCodeConstraints);		ordersPanelHeaderPatientNameDescriptionJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPatientAddressDescriptionJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPatientPhoneDescriptionJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHealthRecordDescriptionJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPatientBirthTimeAndDateDescriptionJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPatientSexDescriptionJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderProviderDescriptionJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPayorDescriptionJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPatientNameOutputJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPatientAddressOutputJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPatientPhoneOutputJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHealthRecordOutputJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPatientBirthTimeAndDateOutputJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPatientSexOutputJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderProviderOutputJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPayorOutputJLabel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));		ordersPanelHeaderPatientNameDescriptionJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPatientAddressDescriptionJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPatientPhoneDescriptionJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHealthRecordDescriptionJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPatientBirthTimeAndDateDescriptionJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPatientSexDescriptionJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderProviderDescriptionJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPayorDescriptionJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPatientNameOutputJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPatientAddressOutputJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPatientPhoneOutputJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHealthRecordOutputJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPatientBirthTimeAndDateOutputJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPatientSexOutputJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderProviderOutputJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPayorOutputJLabel.setFont(new Font("arial", Font.PLAIN, 17));		ordersPanelHeaderPatientNameOutputJLabel.setForeground(SystemWindow.outputColor);		ordersPanelHeaderPatientAddressOutputJLabel.setForeground(SystemWindow.outputColor);		ordersPanelHeaderPatientPhoneOutputJLabel.setForeground(SystemWindow.outputColor);		ordersPanelHealthRecordOutputJLabel.setForeground(SystemWindow.outputColor);		ordersPanelHeaderPatientBirthTimeAndDateOutputJLabel.setForeground(SystemWindow.outputColor);		ordersPanelHeaderPatientSexOutputJLabel.setForeground(SystemWindow.outputColor);		ordersPanelHeaderProviderOutputJLabel.setForeground(SystemWindow.outputColor);		ordersPanelHeaderPayorOutputJLabel.setForeground(SystemWindow.outputColor);		orderEntryBottomCardedPanelCPTPanelScrollPaneColumnHeaderJLabel1.setFont(new Font(Font.MONOSPACED, Font.BOLD, 16));		orderEntryBottomCardedPanelICDPanelScrollPaneColumnHeaderJLabel1.setFont(new Font(Font.MONOSPACED, Font.BOLD, 16));		orderEntryBottomCardedPanelLOINCPanelScrollPaneColumnHeaderJLabel1.setFont(new Font(Font.MONOSPACED, Font.BOLD, 16));		orderEntryBottomCardedPanelHCPCS1PanelScrollPaneColumnHeaderJLabel1.setFont(new Font(Font.MONOSPACED, Font.BOLD, 16));		orderEntryBottomCardedPanelHCPCS2PanelScrollPaneColumnHeaderJLabel1.setFont(new Font(Font.MONOSPACED, Font.BOLD, 16));		orderEntryBottomCardedPanelRxNormPanelScrollPaneColumnHeaderJLabel1.setFont(new Font(Font.MONOSPACED, Font.BOLD, 16));		cPTContentsQueryJTextField.setForeground(new Color(65, 65, 195));		cPTContentsQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		cPTContentsQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		cPTContentsQueryJTextField.addActionListener(this);		cPTContentsQueryJTextField.addMouseListener(this);		cPTContentsQueryJTextField.setActionCommand("cPTContentsQueryJTextField");		cPTContentsQueryJTextField.setName("cPTContentsQueryJTextField");		cPTCodeQueryJTextField.setForeground(new Color(65, 65, 195));		cPTCodeQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		cPTCodeQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		cPTCodeQueryJTextField.addActionListener(this);		cPTCodeQueryJTextField.addMouseListener(this);		cPTCodeQueryJTextField.setActionCommand("cPTCodeQueryJTextField");		cPTCodeQueryJTextField.setName("cPTCodeQueryJTextField");		iCDContentsQueryJTextField.setForeground(new Color(65, 65, 195));		iCDContentsQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		iCDContentsQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		iCDContentsQueryJTextField.addActionListener(this);		iCDContentsQueryJTextField.addMouseListener(this);		iCDContentsQueryJTextField.setActionCommand("iCDContentsQueryJTextField");		iCDContentsQueryJTextField.setName("iCDContentsQueryJTextField");		iCDCodeQueryJTextField.setForeground(new Color(65, 65, 195));		iCDCodeQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		iCDCodeQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		iCDCodeQueryJTextField.addActionListener(this);		iCDCodeQueryJTextField.setActionCommand("iCDCodeQueryJTextField");		iCDCodeQueryJTextField.addMouseListener(this);		iCDCodeQueryJTextField.setName("iCDCodeQueryJTextField");		lOINCContentsQueryJTextField.setForeground(new Color(65, 65, 195));		lOINCContentsQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		lOINCContentsQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		lOINCContentsQueryJTextField.addActionListener(this);		lOINCContentsQueryJTextField.setActionCommand("lOINCContentsQueryJTextField");		lOINCContentsQueryJTextField.addMouseListener(this);		lOINCContentsQueryJTextField.setName("lOINCContentsQueryJTextField");		lOINCCodeQueryJTextField.setForeground(new Color(65, 65, 195));		lOINCCodeQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		lOINCCodeQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		lOINCCodeQueryJTextField.addActionListener(this);		lOINCCodeQueryJTextField.setActionCommand("lOINCCodeQueryJTextField");		lOINCCodeQueryJTextField.addMouseListener(this);		lOINCCodeQueryJTextField.setName("lOINCCodeQueryJTextField");		rXNormContentsQueryJTextField.setForeground(new Color(65, 65, 195));		rXNormContentsQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		rXNormContentsQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		rXNormContentsQueryJTextField.addActionListener(this);		rXNormContentsQueryJTextField.setActionCommand("rXNormContentsQueryJTextField");		rXNormContentsQueryJTextField.addMouseListener(this);		rXNormContentsQueryJTextField.setName("rXNormContentsQueryJTextField");		rXNormCodeQueryJTextField.setForeground(new Color(65, 65, 195));		rXNormCodeQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		rXNormCodeQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		rXNormCodeQueryJTextField.addActionListener(this);		rXNormCodeQueryJTextField.addMouseListener(this);		rXNormCodeQueryJTextField.setActionCommand("rXNormCodeQueryJTextField");		rXNormCodeQueryJTextField.setName("rXNormCodeQueryJTextField");		hCPCS1ContentsQueryJTextField.setForeground(new Color(65, 65, 195));		hCPCS1ContentsQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		hCPCS1ContentsQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		hCPCS1CodeQueryJTextField.setForeground(new Color(65, 65, 195));		hCPCS1CodeQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		hCPCS1CodeQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		hCPCS2ContentsQueryJTextField.setForeground(new Color(65, 65, 195));		hCPCS2ContentsQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		hCPCS2ContentsQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		hCPCS2CodeQueryJTextField.setForeground(new Color(65, 65, 195));		hCPCS2CodeQueryJTextField.setBorder(new LineBorder(new Color(85, 85, 85), 1));		hCPCS2CodeQueryJTextField.setFont(new Font("arial", Font.PLAIN, 19));		orderEntryPanelLabelAndTextFieldConstraints.anchor = GridBagConstraints.SOUTHWEST;		orderEntryHeaderPatientNameJPanel.add(ordersPanelHeaderPatientNameDescriptionJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderPatientAddressJPanel.add(ordersPanelHeaderPatientAddressDescriptionJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderPatientPhoneJPanel.add(ordersPanelHeaderPatientPhoneDescriptionJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderHealthRecordJPanel.add(ordersPanelHealthRecordDescriptionJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderPatientAgeJPanel.add(ordersPanelHeaderPatientBirthTimeAndDateDescriptionJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderPatientSexJPanel.add(ordersPanelHeaderPatientSexDescriptionJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderProviderJPanel.add(ordersPanelHeaderProviderDescriptionJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderPayorJPanel.add(ordersPanelHeaderPayorDescriptionJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryPanelLabelAndTextFieldConstraints.fill = GridBagConstraints.HORIZONTAL;		orderEntryPanelLabelAndTextFieldConstraints.weightx = 1;		orderEntryPanelLabelAndTextFieldConstraints.gridx = 1;		orderEntryHeaderPatientNameJPanel.add(ordersPanelHeaderPatientNameOutputJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderPatientAddressJPanel.add(ordersPanelHeaderPatientAddressOutputJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderPatientPhoneJPanel.add(ordersPanelHeaderPatientPhoneOutputJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderHealthRecordJPanel.add(ordersPanelHealthRecordOutputJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderPatientAgeJPanel.add(ordersPanelHeaderPatientBirthTimeAndDateOutputJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderPatientSexJPanel.add(ordersPanelHeaderPatientSexOutputJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderProviderJPanel.add(ordersPanelHeaderProviderOutputJLabel, orderEntryPanelLabelAndTextFieldConstraints);		orderEntryHeaderPayorJPanel.add(ordersPanelHeaderPayorOutputJLabel, orderEntryPanelLabelAndTextFieldConstraints);		cPTContentsPromptJLabel.setFont(new Font("arial", Font.PLAIN, 17));		cPTCodePromptJLabel.setFont(new Font("arial", Font.PLAIN, 17));		iCDContentsPromptJLabel.setFont(new Font("arial", Font.PLAIN, 17));		iCDCodePromptJLabel.setFont(new Font("arial", Font.PLAIN, 17));		lOINCContentsPromptJLabel.setFont(new Font("arial", Font.PLAIN, 17));		lOINCCodePromptJLabel.setFont(new Font("arial", Font.PLAIN, 17));		rXNormContentsPromptJLabel.setFont(new Font("arial", Font.PLAIN, 17));		rXNormCodePromptJLabel.setFont(new Font("arial", Font.PLAIN, 17));		hCPCS1ContentsPromptJLabel.setFont(new Font("arial", Font.PLAIN, 17));		hCPCS1CodeQueryJLabel.setFont(new Font("arial", Font.PLAIN, 17));		hCPCS2ContentsPromptJLabel.setFont(new Font("arial", Font.PLAIN, 17));		hCPCS2CodePromptJLabel.setFont(new Font("arial", Font.PLAIN, 17));		cPTIdentifiersInputPanelConstraints.anchor = GridBagConstraints.CENTER;		cPTIdentifiersInputPanelConstraints.insets = new Insets(6, 12, 6, 12);		cPTIdentifiersInputPanelConstraints.gridwidth = 2;		cPTCodeEntryJPanel.setOpaque(false);		iCDCodeEntryJPanel.setOpaque(false);		lOINCCodeEntryJPanel.setOpaque(false);		rXNormCodeEntryJPanel.setOpaque(false);		hCPCS1CodeEntryJPanel.setOpaque(false);		hCPCS2CodeEntryJPanel.setOpaque(false);		cPTCodeEntryJPanel.add(cPTOrderEntryCodeSetJLabel, cPTIdentifiersInputPanelConstraints);		iCDCodeEntryJPanel.add(iCDOrderEntryCodeSetJLabel, cPTIdentifiersInputPanelConstraints);		lOINCCodeEntryJPanel.add(lOINCOrderEntryCodeSetJLabel, cPTIdentifiersInputPanelConstraints);		rXNormCodeEntryJPanel.add(rXNormOrderEntryCodeSetJLabel, cPTIdentifiersInputPanelConstraints);		hCPCS1CodeEntryJPanel.add(hCPCS1OrderEntryCodeSetJLabel, cPTIdentifiersInputPanelConstraints);		hCPCS2CodeEntryJPanel.add(hCPCS2OrderEntryCodeSetJLabel, cPTIdentifiersInputPanelConstraints);		cPTIdentifiersInputPanelConstraints.gridy = 1;		cPTIdentifiersInputPanelConstraints.anchor = GridBagConstraints.WEST;		cPTIdentifiersInputPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		cPTIdentifiersInputPanelConstraints.gridwidth = 1;		cPTCodeEntryJPanel.add(cPTContentsPromptJLabel, cPTIdentifiersInputPanelConstraints);		iCDCodeEntryJPanel.add(iCDContentsPromptJLabel, cPTIdentifiersInputPanelConstraints);		lOINCCodeEntryJPanel.add(lOINCContentsPromptJLabel, cPTIdentifiersInputPanelConstraints);		rXNormCodeEntryJPanel.add(rXNormContentsPromptJLabel, cPTIdentifiersInputPanelConstraints);		hCPCS1CodeEntryJPanel.add(hCPCS1ContentsPromptJLabel, cPTIdentifiersInputPanelConstraints);		hCPCS2CodeEntryJPanel.add(hCPCS2ContentsPromptJLabel, cPTIdentifiersInputPanelConstraints);		cPTIdentifiersInputPanelConstraints.gridx = 1;		cPTIdentifiersInputPanelConstraints.weightx = 1;		cPTCodeEntryJPanel.add(cPTContentsQueryJTextField, cPTIdentifiersInputPanelConstraints);		iCDCodeEntryJPanel.add(iCDContentsQueryJTextField, cPTIdentifiersInputPanelConstraints);		lOINCCodeEntryJPanel.add(lOINCContentsQueryJTextField, cPTIdentifiersInputPanelConstraints);		rXNormCodeEntryJPanel.add(rXNormContentsQueryJTextField, cPTIdentifiersInputPanelConstraints);		hCPCS1CodeEntryJPanel.add(hCPCS1ContentsQueryJTextField, cPTIdentifiersInputPanelConstraints);		hCPCS2CodeEntryJPanel.add(hCPCS2ContentsQueryJTextField, cPTIdentifiersInputPanelConstraints);		cPTIdentifiersInputPanelConstraints.gridy = 2;		cPTIdentifiersInputPanelConstraints.gridx = 0;		cPTIdentifiersInputPanelConstraints.weightx = 0;		cPTCodeEntryJPanel.add(cPTCodePromptJLabel, cPTIdentifiersInputPanelConstraints);		iCDCodeEntryJPanel.add(iCDCodePromptJLabel, cPTIdentifiersInputPanelConstraints);		lOINCCodeEntryJPanel.add(lOINCCodePromptJLabel, cPTIdentifiersInputPanelConstraints);		rXNormCodeEntryJPanel.add(rXNormCodePromptJLabel, cPTIdentifiersInputPanelConstraints);		hCPCS1CodeEntryJPanel.add(hCPCS1CodeQueryJLabel, cPTIdentifiersInputPanelConstraints);		hCPCS2CodeEntryJPanel.add(hCPCS2CodePromptJLabel, cPTIdentifiersInputPanelConstraints);		cPTIdentifiersInputPanelConstraints.gridx = 1;		cPTIdentifiersInputPanelConstraints.weightx = 1;		cPTCodeEntryJPanel.add(cPTCodeQueryJTextField, cPTIdentifiersInputPanelConstraints);		iCDCodeEntryJPanel.add(iCDCodeQueryJTextField, cPTIdentifiersInputPanelConstraints);		lOINCCodeEntryJPanel.add(lOINCCodeQueryJTextField, cPTIdentifiersInputPanelConstraints);		rXNormCodeEntryJPanel.add(rXNormCodeQueryJTextField, cPTIdentifiersInputPanelConstraints);		hCPCS1CodeEntryJPanel.add(hCPCS1CodeQueryJTextField, cPTIdentifiersInputPanelConstraints);		hCPCS2CodeEntryJPanel.add(hCPCS2CodeQueryJTextField, cPTIdentifiersInputPanelConstraints);		orderEntryPanelGridBagConstraints.fill = GridBagConstraints.HORIZONTAL;		orderEntryPanelGridBagConstraints.weightx = 1;		orderEntryPanelGridBagConstraints.anchor = GridBagConstraints.WEST;		orderEntryPanelGridBagConstraints.insets = new Insets(4, 4, 4, 4);		orderEntryPanelHeaderJPanel.add(orderEntryHeaderPatientNameJPanel, orderEntryPanelGridBagConstraints);		orderEntryPanelGridBagConstraints.gridx = 1;		orderEntryPanelHeaderJPanel.add(orderEntryHeaderPatientAgeJPanel, orderEntryPanelGridBagConstraints);		orderEntryPanelGridBagConstraints.gridx = 2;		orderEntryPanelHeaderJPanel.add(orderEntryHeaderHealthRecordJPanel, orderEntryPanelGridBagConstraints);		orderEntryPanelGridBagConstraints.gridy = 1;		orderEntryPanelGridBagConstraints.gridx = 0;		orderEntryPanelGridBagConstraints.gridwidth = 2;		orderEntryPanelHeaderJPanel.add(orderEntryHeaderPatientAddressJPanel, orderEntryPanelGridBagConstraints);		orderEntryPanelGridBagConstraints.gridx = 2;		orderEntryPanelGridBagConstraints.gridwidth = 1;		orderEntryPanelHeaderJPanel.add(orderEntryHeaderPatientPhoneJPanel, orderEntryPanelGridBagConstraints);		orderEntryPanelGridBagConstraints.gridy = 2;		orderEntryPanelGridBagConstraints.gridx = 0;		orderEntryPanelGridBagConstraints.gridwidth = 1;		orderEntryPanelHeaderJPanel.add(orderEntryHeaderPayorJPanel, orderEntryPanelGridBagConstraints);		orderEntryPanelGridBagConstraints.gridx = 1;		orderEntryPanelGridBagConstraints.gridwidth = 1;		orderEntryPanelHeaderJPanel.add(orderEntryHeaderProviderJPanel, orderEntryPanelGridBagConstraints);		orderEntryPanelGridBagConstraints.gridx = 2;		orderEntryPanelHeaderJPanel.add(orderEntryHeaderPatientSexJPanel, orderEntryPanelGridBagConstraints);		orderEntryPanelBaseJPanel.setOpaque(false);		orderEntryPanelBaseJPanel.setBorder(new CompoundBorder(new CompoundBorder(new BevelBorder(BevelBorder.RAISED), new LineBorder(SystemWindow.quintessentialThemeColor, 11)), new BevelBorder(BevelBorder.LOWERED)));		orderEntryPanelBaseJPanel.add(orderEntryJPanel);		addPrescriptionJButton.setMnemonic('A');		addPrescriptionJButton.addActionListener(this);		addPrescriptionJButton.setActionCommand("addPrescriptionJButton");		amendPrescriptionJButton.setMnemonic('M');		amendPrescriptionJButton.addActionListener(this);		amendPrescriptionJButton.setActionCommand("amendPrescriptionJButton");		orderEntryBottomCardedJPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));		orderEntryJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		ordersPanelCodeSetButtonsBaseJPanel.setBackground(SystemWindow.quintessentialThemeColor);		orderEntryBasePanelHeaderBaseJPanel.setBackground(new Color(255, 255, 255));		orderEntryBasePanelHeaderBaseJPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));		ordersPanelCodeSetButtonsBaseJPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));		codeInputBaseJPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));		orderEntryCodeChoicesScrollPaneJPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));		orderEntryOkButtonsJPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));		orderEntryPanelCodeSetButtonsJPanel.setOpaque(false);		orderEntryPanelHeaderJPanel.setOpaque(false);		orderEntryHeaderPatientNameJPanel.setOpaque(false);		orderEntryHeaderPatientAddressJPanel.setOpaque(false);		orderEntryHeaderPatientPhoneJPanel.setOpaque(false);		orderEntryHeaderHealthRecordJPanel.setOpaque(false);		orderEntryHeaderPatientAgeJPanel.setOpaque(false);		orderEntryHeaderPatientSexJPanel.setOpaque(false);		orderEntryHeaderProviderJPanel.setOpaque(false);		orderEntryHeaderPayorJPanel.setOpaque(false);		codeInputCardedJPanel.setOpaque(false);		orderEntryBottomCardedJPanel.setOpaque(false);		ordersPanelCodeSetButtonsBasePanelConstraints.weighty = 1;		ordersPanelCodeSetButtonsBasePanelConstraints.weightx = 1;		ordersPanelCodeSetButtonsBasePanelConstraints.fill = GridBagConstraints.VERTICAL;		ordersPanelCodeSetButtonsBaseJPanel.add(orderEntryPanelCodeSetButtonsJPanel, ordersPanelCodeSetButtonsBasePanelConstraints);		orderEntryBasePanelHeaderBasePanelConstraints.weightx = 1;		orderEntryBasePanelHeaderBasePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		orderEntryBasePanelHeaderBaseJPanel.add(orderEntryPanelHeaderJPanel, orderEntryBasePanelHeaderBasePanelConstraints);		codeInputBaseJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		codeInputBasePanelConstraints.weightx = 1;		codeInputBasePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		codeInputBaseJPanel.add(codeInputCardedJPanel, codeInputBasePanelConstraints);		codeInputTopCardedPanelBlankJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		codeInputCardedJPanel.add(codeInputTopCardedPanelBlankJPanel, "codeInputTopCardedPanelBlankJPanel");		codeInputCardedJPanel.add(cPTCodeEntryJPanel, "codeInputTopCardedPanelCPTJPanel");		codeInputCardedJPanel.add(iCDCodeEntryJPanel, "codeInputTopCardedPanelICDJPanel");		codeInputCardedJPanel.add(lOINCCodeEntryJPanel, "codeInputTopCardedPanelLOINCJPanel");		codeInputCardedJPanel.add(hCPCS1CodeEntryJPanel, "codeInputTopCardedPanelHCPCS1JPanel");		codeInputCardedJPanel.add(hCPCS2CodeEntryJPanel, "codeInputTopCardedPanelHCPCS2JPanel");		codeInputCardedJPanel.add(rXNormCodeEntryJPanel, "codeInputTopCardedPanelRxNormJPanel");		codeInputTopCardLayout.show(codeInputCardedJPanel, "codeInputTopCardedPanelBlankJPanel");		orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);		orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);		orderEntryBottomCardedJPanel.add(orderEntryBottomCardedPanelBlankJPanel, "orderEntryBottomCardedPanelBlankJPanel");		orderEntryBottomCardedJPanel.add(orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane, "orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane");		orderEntryBottomCardedJPanel.add(orderEntryBottomCardedPanelOrderSetsPanelJScrollPane, "orderEntryBottomCardedPanelOrderSetsPanelJScrollPane");		orderEntryBottomCardedJPanel.add(orderEntryBottomCardedPanelPlaceOrderJPanel, "orderEntryBottomCardedPanelPlaceOrderJPanel");		orderEntryBottomCardedJPanel.add(orderEntryBottomCardedPanelScheduleOrderJPanel, "orderEntryBottomCardedPanelScheduleOrderJPanel");		orderEntryBottomCardLayout.show(orderEntryBottomCardedJPanel, "orderEntryBottomCardedPanelBlankJPanel");		orderEntryBottomCardedPanelScheduleOrderJPanel.add(new JLabel("orderEntryBottomCardedPanelScheduleOrderJPanel"));		orderEntryBottomCardedPanelPlaceOrderJPanel.add(new JLabel("orderEntryBottomCardedPanelPlaceOrderJPanel"));		orderEntryBottomCardedPanelOrderSetsJPanel.add(new JLabel("orderEntryBottomCardedPanelOrderSetsJPanel"));		orderEntryPlaceOrderJButton.setMnemonic('M');		orderEntryPlaceOrderJButton.addActionListener(this);		orderEntryPlaceOrderJButton.setActionCommand("orderEntryPlaceOrderJButton");		orderEntryScheduleAndBatchOrderAtTimeJButton.setMnemonic('O');		orderEntryScheduleAndBatchOrderAtTimeJButton.addActionListener(this);		orderEntryScheduleAndBatchOrderAtTimeJButton.setActionCommand("orderEntryScheduleAndBatchOrderAtTimeJButton");		orderEntryScheduleAndBatchOrderOnDateJButton.setMnemonic('D');		orderEntryScheduleAndBatchOrderOnDateJButton.addActionListener(this);		orderEntryScheduleAndBatchOrderOnDateJButton.setActionCommand("orderEntryScheduleAndBatchOrderOnDateJButton");		orderEntryScheduleAndBatchOrderJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		orderEntryScheduleAndBatchOrderPanelConstraints.insets = new Insets(10, 10, 0, 5);		orderEntryScheduleAndBatchOrderJPanel.add(orderEntryScheduleAndBatchOrderAtTimeJLabel, orderEntryScheduleAndBatchOrderPanelConstraints);		orderEntryScheduleAndBatchOrderPanelConstraints.gridx = 1;		orderEntryScheduleAndBatchOrderPanelConstraints.weightx = 1;		orderEntryScheduleAndBatchOrderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		orderEntryScheduleAndBatchOrderPanelConstraints.insets = new Insets(10, 5, 5, 5);		orderEntryScheduleAndBatchOrderJPanel.add(orderEntryScheduleAndBatchOrderAtTimeJTextField, orderEntryScheduleAndBatchOrderPanelConstraints);		orderEntryScheduleAndBatchOrderPanelConstraints.weightx = 0;		orderEntryScheduleAndBatchOrderPanelConstraints.fill = GridBagConstraints.NONE;		orderEntryScheduleAndBatchOrderPanelConstraints.gridy = 1;		orderEntryScheduleAndBatchOrderPanelConstraints.insets = new Insets(5, 5, 10, 5);		orderEntryScheduleAndBatchOrderJPanel.add(orderEntryScheduleAndBatchOrderAtTimeJButton, orderEntryScheduleAndBatchOrderPanelConstraints);		orderEntryScheduleAndBatchOrderPanelConstraints.gridy = 0;		orderEntryScheduleAndBatchOrderPanelConstraints.gridx = 2;		orderEntryScheduleAndBatchOrderPanelConstraints.insets = new Insets(10, 5, 0, 10);		orderEntryScheduleAndBatchOrderJPanel.add(orderEntryScheduleAndBatchOrderOnDateJLabel, orderEntryScheduleAndBatchOrderPanelConstraints);		orderEntryScheduleAndBatchOrderPanelConstraints.gridx = 3;		orderEntryScheduleAndBatchOrderPanelConstraints.weightx = 1;		orderEntryScheduleAndBatchOrderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		orderEntryScheduleAndBatchOrderPanelConstraints.insets = new Insets(10, 5, 5, 10);		orderEntryScheduleAndBatchOrderJPanel.add(orderEntryScheduleAndBatchOrderOnDateJTextField, orderEntryScheduleAndBatchOrderPanelConstraints);		orderEntryScheduleAndBatchOrderPanelConstraints.gridy = 1;		orderEntryScheduleAndBatchOrderPanelConstraints.weightx = 0;		orderEntryScheduleAndBatchOrderPanelConstraints.fill = GridBagConstraints.NONE;		orderEntryScheduleAndBatchOrderPanelConstraints.insets = new Insets(5, 5, 10, 10);		orderEntryScheduleAndBatchOrderJPanel.add(orderEntryScheduleAndBatchOrderOnDateJButton, orderEntryScheduleAndBatchOrderPanelConstraints);		orderEntryScheduleAndBatchOrderJPopupMenu.add(orderEntryScheduleAndBatchOrderJPanel);		orderEntryScheduleAndBatchOrderPanelConstraints.gridx = 1;		orderEntryScheduleAndBatchOrderJButton.setMnemonic('S');		orderEntryScheduleAndBatchOrderJButton.addActionListener(this);		orderEntryScheduleAndBatchOrderJButton.setActionCommand("orderEntryScheduleAndBatchOrderJButton");		cPTOrderEntryCodeSetJLabel.setFont(new Font("arial", Font.PLAIN, 17));		iCDOrderEntryCodeSetJLabel.setFont(new Font("arial", Font.PLAIN, 17));		lOINCOrderEntryCodeSetJLabel.setFont(new Font("arial", Font.PLAIN, 17));		rXNormOrderEntryCodeSetJLabel.setFont(new Font("arial", Font.PLAIN, 17));		hCPCS1OrderEntryCodeSetJLabel.setFont(new Font("arial", Font.PLAIN, 17));		hCPCS1OrderEntryCodeSetJLabel.setFont(new Font("arial", Font.PLAIN, 17));		orderEntryOkButtonsJPanel.setBackground(SystemWindow.quintessentialThemeColor);		orderEntryButtonsPanelConstraints.insets = new Insets(4, 4, 4, 2);		orderEntryOkButtonsJPanel.add(orderEntryScheduleAndBatchOrderJButton, orderEntryButtonsPanelConstraints);		orderEntryButtonsPanelConstraints.gridx = 1;		orderEntryButtonsPanelConstraints.insets = new Insets(4, 2, 4, 4);		orderEntryOkButtonsJPanel.add(orderEntryPlaceOrderJButton, orderEntryButtonsPanelConstraints);		diagnosticJTextArea.setOpaque(false);		diagnosticJTextArea.setEditable(false);		diagnosticJTextArea.setWrapStyleWord(true);		diagnosticTextAreaPanelConstraints.insets = new Insets(0, 6, 0, 6);		diagnosticTextAreaPanelConstraints.weightx = 1;		diagnosticTextAreaPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		diagnosticTextAreaJPanel.setOpaque(false);		diagnosticTextAreaJPanel.add(diagnosticJTextArea, diagnosticTextAreaPanelConstraints);		diagnosticOrderJPanel.setBackground(new Color(248, 255, 255));		diagnosticOrderJPanel.setBorder(new CompoundBorder(new MatteBorder(0, 0, 2, 2, new Color(165, 155, 152)), new MatteBorder(1, 1, 0, 0, Color.WHITE)));		diagnosticOrderPanelHeaderJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(85, 85, 85)));		diagnosticOrderPanelPusherJPanel.setOpaque(false);		diagnosticOrderPanelConstraints.anchor = GridBagConstraints.WEST;		diagnosticOrderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		diagnosticOrderPanelConstraints.insets = new Insets(12, 12, 12, 12);		diagnosticOrderPanelConstraints.weightx = 1;		diagnosticOrderJPanel.add(diagnosticOrderPanelHeaderJLabel, diagnosticOrderPanelConstraints);		diagnosticOrderPanelConstraints.gridy = 1;		diagnosticOrderJPanel.add(diagnosticTextAreaJPanel, diagnosticOrderPanelConstraints);		diagnosticOrderPanelConstraints.gridy = 2;		diagnosticOrderPanelConstraints.gridx = 1;		diagnosticOrderPanelConstraints.weighty = 1;		diagnosticOrderPanelConstraints.fill = GridBagConstraints.BOTH;		diagnosticOrderPanelConstraints.insets = new Insets(0, 0, 0, 0);		diagnosticOrderJPanel.add(diagnosticOrderPanelPusherJPanel, diagnosticOrderPanelConstraints);		proceduralJTextArea.setOpaque(false);		proceduralJTextArea.setEditable(false);		proceduralJTextArea.setWrapStyleWord(true);		proceduralTextAreaPanelConstraints.insets = new Insets(0, 6, 0, 6);		proceduralTextAreaPanelConstraints.weightx = 1;		proceduralTextAreaPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		proceduralTextAreaJPanel.setOpaque(false);		proceduralTextAreaJPanel.add(proceduralJTextArea, proceduralTextAreaPanelConstraints);		proceduralOrderJPanel.setBackground(new Color(248, 255, 255));		proceduralOrderJPanel.setBorder(new CompoundBorder(new MatteBorder(0, 0, 2, 2, new Color(165, 155, 152)), new MatteBorder(1, 1, 0, 0, Color.WHITE)));		proceduralOrderPanelHeaderJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(85, 85, 85)));		proceduralOrderPanelPusherJPanel.setOpaque(false);		proceduralOrderPanelConstraints.anchor = GridBagConstraints.WEST;		proceduralOrderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		proceduralOrderPanelConstraints.insets = new Insets(12, 12, 12, 12);		proceduralOrderPanelConstraints.weightx = 1;		proceduralOrderJPanel.add(proceduralOrderPanelHeaderJLabel, proceduralOrderPanelConstraints);		proceduralOrderPanelConstraints.gridy = 1;		proceduralOrderJPanel.add(proceduralTextAreaJPanel, proceduralOrderPanelConstraints);		proceduralOrderPanelConstraints.gridy = 2;		proceduralOrderPanelConstraints.gridx = 1;		proceduralOrderPanelConstraints.weighty = 1;		proceduralOrderPanelConstraints.fill = GridBagConstraints.BOTH;		proceduralOrderPanelConstraints.insets = new Insets(0, 0, 0, 0);		proceduralOrderJPanel.add(proceduralOrderPanelPusherJPanel, proceduralOrderPanelConstraints);		lOINCOrderPanelMedicalCodeJLabel.setFont(smallOrderEntryFont);		lOINCOrderPanelHeaderJPanel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(85, 85, 85)));		lOINCOrderPanelHeaderJPanel.setOpaque(false);		lOINCOrderPanelHeaderPanelConstraints.gridx = 0;		lOINCOrderPanelHeaderJPanel.add(lOINCOrderPanelHeaderJLabel, lOINCOrderPanelHeaderPanelConstraints);		lOINCOrderPanelHeaderPanelConstraints.gridx = 1;		lOINCOrderPanelHeaderPanelConstraints.weightx = 1;		lOINCOrderPanelHeaderPanelConstraints.anchor = GridBagConstraints.WEST;		lOINCOrderPanelHeaderJPanel.add(lOINCOrderPanelMedicalCodeJLabel, lOINCOrderPanelHeaderPanelConstraints);		lOINCOrderJPanel.setBackground(new Color(248, 255, 255));		lOINCOrderJPanel.setBorder(new CompoundBorder(new MatteBorder(0, 0, 2, 2, new Color(165, 155, 152)), new MatteBorder(1, 1, 0, 0, Color.WHITE)));		lOINCOrderPanelPusherJPanel.setOpaque(false);		lOINCOrderPanelConstraints.anchor = GridBagConstraints.WEST;		lOINCOrderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		lOINCOrderPanelConstraints.insets = new Insets(12, 12, 12, 12);		lOINCOrderPanelConstraints.weightx = 1;		lOINCOrderPanelConstraints.gridwidth = 3;		lOINCOrderJPanel.add(lOINCOrderPanelHeaderJPanel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridy = 1;		lOINCOrderPanelConstraints.insets = new Insets(0, 12, 0, 3);		lOINCOrderPanelConstraints.fill = GridBagConstraints.NONE;		lOINCOrderPanelConstraints.weightx = 0;		lOINCOrderPanelConstraints.gridwidth = 1;		lOINCOrderJPanel.add(observationAxisComponentTitleJLabel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridx = 1;		lOINCOrderPanelConstraints.insets = new Insets(0, 3, 0, 12);		lOINCOrderJPanel.add(observationAxisComponentContentTextAreaJPanel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridy = 2;		lOINCOrderPanelConstraints.gridx = 0;		lOINCOrderPanelConstraints.insets = new Insets(0, 12, 0, 3);		lOINCOrderPanelConstraints.fill = GridBagConstraints.NONE;		lOINCOrderPanelConstraints.weightx = 0;		lOINCOrderJPanel.add(observationAxisPropertyTitleJLabel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridx = 1;		lOINCOrderPanelConstraints.insets = new Insets(0, 3, 0, 12);		lOINCOrderJPanel.add(observationAxisPropertyContentJLabel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridy = 3;		lOINCOrderPanelConstraints.gridx = 0;		lOINCOrderPanelConstraints.insets = new Insets(0, 12, 0, 3);		lOINCOrderPanelConstraints.fill = GridBagConstraints.NONE;		lOINCOrderPanelConstraints.weightx = 0;		lOINCOrderJPanel.add(observationAxisTimeAspectTitleJLabel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridx = 1;		lOINCOrderPanelConstraints.insets = new Insets(0, 3, 0, 12);		lOINCOrderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		lOINCOrderPanelConstraints.weightx = 1;		lOINCOrderJPanel.add(observationAxisTimeAspectContentJLabel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridy = 4;		lOINCOrderPanelConstraints.gridx = 0;		lOINCOrderPanelConstraints.insets = new Insets(0, 12, 0, 3);		lOINCOrderPanelConstraints.fill = GridBagConstraints.NONE;		lOINCOrderPanelConstraints.weightx = 0;		lOINCOrderJPanel.add(observationAxisSystemTitleJLabel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridx = 1;		lOINCOrderPanelConstraints.insets = new Insets(0, 3, 0, 12);		lOINCOrderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		lOINCOrderPanelConstraints.weightx = 1;		lOINCOrderJPanel.add(observationAxisSystemContentJLabel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridy = 5;		lOINCOrderPanelConstraints.gridx = 0;		lOINCOrderPanelConstraints.insets = new Insets(0, 12, 0, 3);		lOINCOrderPanelConstraints.fill = GridBagConstraints.NONE;		lOINCOrderPanelConstraints.weightx = 0;		lOINCOrderJPanel.add(observationAxisScaletypeTitleJLabel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridx = 1;		lOINCOrderPanelConstraints.insets = new Insets(0, 3, 0, 12);		lOINCOrderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		lOINCOrderPanelConstraints.weightx = 1;		lOINCOrderJPanel.add(observationAxisScaletypeContentJLabel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridy = 6;		lOINCOrderPanelConstraints.gridx = 0;		lOINCOrderPanelConstraints.insets = new Insets(0, 12, 0, 3);		lOINCOrderPanelConstraints.fill = GridBagConstraints.NONE;		lOINCOrderPanelConstraints.weightx = 0;		lOINCOrderJPanel.add(observationAxisMethodTitleJLabel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.gridx = 1;		lOINCOrderPanelConstraints.insets = new Insets(0, 3, 0, 12);		lOINCOrderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		lOINCOrderPanelConstraints.weightx = 1;		lOINCOrderJPanel.add(observationAxisMethodContentJLabel, lOINCOrderPanelConstraints);		lOINCOrderPanelConstraints.weighty = 1;		lOINCOrderPanelConstraints.fill = GridBagConstraints.BOTH;		lOINCOrderPanelConstraints.gridy = 7;		lOINCOrderPanelConstraints.gridx = 1;		lOINCOrderPanelConstraints.insets = new Insets(0, 0, 0, 0);		lOINCOrderJPanel.add(lOINCOrderPanelPusherJPanel, lOINCOrderPanelConstraints);		observationAxisComponentContentJTextArea.setOpaque(false);		observationAxisComponentContentJTextArea.setEditable(false);		observationAxisComponentContentJTextArea.setWrapStyleWord(true);		observationAxisComponentContentTextAreaPanelConstraints.insets = new Insets(0, 6, 0, 6);		observationAxisComponentContentTextAreaPanelConstraints.weightx = 1;		observationAxisComponentContentTextAreaPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		observationAxisComponentContentTextAreaJPanel.setOpaque(false);		observationAxisComponentContentTextAreaJPanel.add(observationAxisComponentContentJTextArea, observationAxisComponentContentTextAreaPanelConstraints);		displayOrdersCardedBasePanelAddedJLabel.setFont(new Font("Electron", Font.BOLD, 102));		displayOrdersCardedBasePanelAddedJLabel.setForeground(new Color(0, 0, 0, 85));		displayOrdersCardedBasePanelAddedJPanel.setOpaque(false);		displayOrdersCardedBasePanelAddedJPanel.setBackground(new Color(0, 0, 0, 64));		prescriptionOrderJPanel.setBackground(new Color(244, 251, 255));		displayOrdersCardedPanelBaseJPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));		displayOrdersCardedPanelBlankJPanel.setBackground(SystemWindow.quintessentialThemeColor);		displayOrdersCardedJPanel.add(diagnosticOrderJPanel, "diagnosticOrderJPanel");		displayOrdersCardedJPanel.add(proceduralOrderJPanel, "proceduralOrderJPanel");		displayOrdersCardedJPanel.add(lOINCOrderJPanel, "lOINCOrderJPanel");		displayOrdersCardedJPanel.add(prescriptionOrderJPanel, "prescriptionOrderJPanel");		displayOrdersCardedJPanel.add(displayOrdersCardedPanelBlankJPanel, "displayOrdersCardedPanelBlankJPanel");		displayOrdersCardLayout.show(displayOrdersCardedJPanel, "displayOrdersCardedPanelBlankJPanel");		displayOrdersCardedPanelBasePanelConstraints.gridy = 0;		displayOrdersCardedPanelBasePanelConstraints.gridx = 0;		displayOrdersCardedPanelBasePanelConstraints.insets = new Insets(24, 24, 24, 24);		displayOrdersCardedPanelBasePanelConstraints.weighty = 1;		displayOrdersCardedPanelBasePanelConstraints.weightx = 1;		displayOrdersCardedPanelBasePanelConstraints.fill = GridBagConstraints.BOTH;		displayOrdersCardedPanelBaseJPanel.add(displayOrdersCardedBasePanelAddedJPanel, displayOrdersCardedPanelBasePanelConstraints);		displayOrdersCardedPanelBaseJPanel.add(displayOrdersCardedJPanel, displayOrdersCardedPanelBasePanelConstraints);		displayOrdersCardedPanelBaseJPanel.setBackground(SystemWindow.quintessentialThemeColor);		orderEntryCodeChoicesJPanel.setBackground(Color.WHITE);		orderEntryCodeChoicesScrollPaneConstraints.weighty = 1;		orderEntryCodeChoicesScrollPaneConstraints.weightx = 1;		orderEntryCodeChoicesScrollPaneConstraints.fill = GridBagConstraints.BOTH;		orderEntryCodeChoicesScrollPaneJPanel.add(orderEntryCodeChoicesJScrollPane, orderEntryCodeChoicesScrollPaneConstraints);		orderEntryCodeChoicesScrollPaneJPanel.setPreferredSize(new Dimension(1, 225));		orderEntryCodeChoicesJScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);		orderEntryCodeChoicesJScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);		orderEntryCodeDetailsJPopupMenu.add(orderEntryBottomCardedJPanel);		orderEntryCodeDetailsPopupMenuJButton.setMnemonic('V');		orderEntryCodeDetailsPopupMenuJButton.setFont(new Font("arial", Font.BOLD, 15));		orderEntryCodeDetailsPopupMenuJButton.addActionListener(this);		orderEntryCodeDetailsPopupMenuJButton.setActionCommand("orderEntryCodeDetailsPopupMenuJButton");		orderEntryCodeDetailsPopupMenuButtonBaseJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		orderEntryCodeDetailsPopupMenuButtonBaseJPanel.add(orderEntryCodeDetailsPopupMenuJButton, orderEntryCodeDetailsPopupMenuButtonBasePanelConstraints);		prescriptionOrderDrugJTextArea.setEditable(false);		prescriptionOrderDrugJTextArea.setWrapStyleWord(true);		prescriptionOrderDrugTextAreaJPanel.setBorder(new LineBorder(new Color(85, 85, 85)));		prescriptionOrderDrugTextAreaJPanel.setBackground(Color.WHITE);		prescriptionOrderDrugTextAreaPanelConstraints.insets = new Insets(0, 6, 0, 6);		prescriptionOrderDrugTextAreaPanelConstraints.anchor = GridBagConstraints.WEST;		prescriptionOrderDrugTextAreaJPanel.add(prescriptionOrderDrugJTextArea, prescriptionOrderDrugTextAreaPanelConstraints);		orderEntryCodeChoicePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		orderEntryCodeChoicePanelConstraints.insets = new Insets(10, 10, 5, 5);		orderEntryJPanel.add(orderEntryBasePanelHeaderBaseJPanel, orderEntryCodeChoicePanelConstraints);		orderEntryCodeChoicePanelConstraints.gridx = 1;		orderEntryCodeChoicePanelConstraints.gridheight = 5;		orderEntryCodeChoicePanelConstraints.insets = new Insets(10, 5, 5, 10);		orderEntryJPanel.add(displayOrdersCardedPanelBaseJPanel, orderEntryCodeChoicePanelConstraints);		orderEntryCodeChoicePanelConstraints.gridy = 1;		orderEntryCodeChoicePanelConstraints.gridx = 0;		orderEntryCodeChoicePanelConstraints.insets = new Insets(5, 10, 5, 5);		orderEntryCodeChoicePanelConstraints.gridheight = 1;		orderEntryCodeChoicePanelConstraints.weightx = 1;		orderEntryJPanel.add(ordersPanelCodeSetButtonsBaseJPanel, orderEntryCodeChoicePanelConstraints);		orderEntryCodeChoicePanelConstraints.gridy = 2;		orderEntryCodeChoicePanelConstraints.insets = new Insets(5, 10, 5, 5);		orderEntryJPanel.add(codeInputBaseJPanel, orderEntryCodeChoicePanelConstraints);		orderEntryCodeChoicePanelConstraints.gridy = 3;		orderEntryCodeChoicePanelConstraints.weighty = 1;		orderEntryJPanel.add(orderEntryCodeChoicesScrollPaneJPanel, orderEntryCodeChoicePanelConstraints);		orderEntryCodeChoicePanelConstraints.weighty = 0;		orderEntryCodeChoicePanelConstraints.gridy = 4;		orderEntryCodeChoicePanelConstraints.insets = new Insets(5, 10, 5, 5);		orderEntryJPanel.add(orderEntryOkButtonsJPanel, orderEntryCodeChoicePanelConstraints);		orderEntryCodeChoicePanelConstraints.gridy = 5;		orderEntryCodeChoicePanelConstraints.gridwidth = 2;		orderEntryCodeChoicePanelConstraints.insets = new Insets(5, 10, 10, 10);		orderEntryJPanel.add(orderEntryCodeDetailsPopupMenuButtonBaseJPanel, orderEntryCodeChoicePanelConstraints);		prescriptionOrderPanelsConstraints.gridx = 0;		prescriptionOrderPanelsConstraints.anchor = GridBagConstraints.WEST;		prescriptionOrderPanelsConstraints.fill = GridBagConstraints.HORIZONTAL;		prescriptionOrderDrugJPanel.setOpaque(false);		prescriptionOrderDispenseJPanel.setOpaque(false);		prescriptionOrderSignatureJPanel.setOpaque(false);		prescriptionOrderRefillsAndVoidDateJPanel.setOpaque(false);		prescriptionOrderAlertJPanel.setOpaque(false);		prescriptionOrderCommentJPanel.setOpaque(false);		prescriptionOrderDispenseAsWrittenAndPatientReportedJPanel.setOpaque(false);		prescriptionOrderPharmacyJPanel.setOpaque(false);		prescriptionOrderPanelMedicalCodeJLabel.setFont(smallOrderEntryFont);		prescriptionOrderPromptDrugJPanel.setOpaque(false);		prescriptionOrderPromptDrugPanelConstraints.gridx = 0;		prescriptionOrderPromptDrugJPanel.add(prescriptionOrderPromptDrugJLabel, prescriptionOrderPromptDrugPanelConstraints);		prescriptionOrderPromptDrugPanelConstraints.gridx = 1;		prescriptionOrderPromptDrugPanelConstraints.weightx = 1;		prescriptionOrderPromptDrugPanelConstraints.anchor = GridBagConstraints.WEST;		prescriptionOrderPromptDrugJPanel.add(prescriptionOrderPanelMedicalCodeJLabel, prescriptionOrderPromptDrugPanelConstraints);		prescriptionOrderPanelsConstraints.weightx = 0;		prescriptionOrderDrugJPanel.add(prescriptionOrderPromptDrugJPanel, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.weightx = 1;		prescriptionOrderDrugJPanel.add(prescriptionOrderDrugTextAreaJPanel, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.weightx = 0;		prescriptionOrderDispenseJPanel.add(prescriptionOrderPromptDispenseJLabel, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.weightx = 1;		prescriptionOrderDispenseJPanel.add(prescriptionOrderDispenseJTextField, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.weightx = 0;		prescriptionOrderPanelsConstraints.fill = GridBagConstraints.NONE;		prescriptionOrderRefillsAndVoidDateJPanel.add(prescriptionOrderPromptRefillsJLabel, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 1;		prescriptionOrderPanelsConstraints.insets = new Insets(0, 0, 0, 60);		prescriptionOrderRefillsAndVoidDateJPanel.add(prescriptionOrderRefillsJTextField, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 2;		prescriptionOrderPanelsConstraints.insets = new Insets(0, 0, 0, 0);		prescriptionOrderPanelsConstraints.weightx = 0;		prescriptionOrderPanelsConstraints.fill = GridBagConstraints.NONE;		prescriptionOrderRefillsAndVoidDateJPanel.add(prescriptionOrderPromptVoidDateJLabel, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 3;		prescriptionOrderPanelsConstraints.weightx = 1;		prescriptionOrderPanelsConstraints.fill = GridBagConstraints.HORIZONTAL;		prescriptionOrderRefillsAndVoidDateJPanel.add(prescriptionOrderVoidDateJTextField, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 0;		prescriptionOrderPanelsConstraints.weightx = 0;		prescriptionOrderAlertJPanel.add(prescriptionOrderPromptAlertJLabel, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 1;		prescriptionOrderPanelsConstraints.weightx = 1;		prescriptionOrderAlertJPanel.add(prescriptionOrderAlertJTextField, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 0;		prescriptionOrderPanelsConstraints.weightx = 0;		prescriptionOrderCommentJPanel.add(prescriptionOrderPromptCommentJLabel, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 1;		prescriptionOrderPanelsConstraints.weightx = 1;		prescriptionOrderCommentJPanel.add(prescriptionOrderCommentJTextField, prescriptionOrderPanelsConstraints);		prescriptionOrderDispenseAsWrittenYesJRadioButton.setOpaque(false);		prescriptionOrderDispenseAsWrittenNoJRadioButton.setOpaque(false);		prescriptionOrderPatientReportedYesJRadioButton.setOpaque(false);		prescriptionOrderPatientReportedNoJRadioButton.setOpaque(false);		prescriptionOrderPanelsConstraints.gridx = 0;		prescriptionOrderPanelsConstraints.weightx = 0;		prescriptionOrderDispenseAsWrittenAndPatientReportedJPanel.add(prescriptionOrderPromptDispenseAsWrittenJLabel, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 1;		prescriptionOrderDispenseAsWrittenAndPatientReportedJPanel.add(prescriptionOrderDispenseAsWrittenYesJRadioButton, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 2;		prescriptionOrderDispenseAsWrittenAndPatientReportedJPanel.add(prescriptionOrderDispenseAsWrittenNoJRadioButton, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 3;		prescriptionOrderPanelsConstraints.insets = new Insets(0, 0, 0, 12);		prescriptionOrderDispenseAsWrittenAndPatientReportedJPanel.add(prescriptionOrderPromptPatientReportedJLabel, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 4;		prescriptionOrderPanelsConstraints.insets = new Insets(0, 0, 0, 0);		prescriptionOrderDispenseAsWrittenAndPatientReportedJPanel.add(prescriptionOrderPatientReportedYesJRadioButton, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 5;		prescriptionOrderDispenseAsWrittenAndPatientReportedJPanel.add(prescriptionOrderPatientReportedNoJRadioButton, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 0;		prescriptionOrderPharmacyJPanel.add(prescriptionOrderPromptPharmacyJLabel, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 1;		prescriptionOrderPanelsConstraints.fill = GridBagConstraints.HORIZONTAL;		prescriptionOrderPanelsConstraints.weightx = 1;		prescriptionOrderPharmacyJPanel.add(prescriptionOrderPharmacyJTextField, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.fill = GridBagConstraints.NONE;		prescriptionOrderPanelsConstraints.weightx = 0;		prescriptionOrderPanelsConstraints.gridx = 0;		prescriptionOrderSignatureJPanel.add(prescriptionOrderPromptSignatureJLabel, prescriptionOrderPanelsConstraints);		prescriptionOrderPanelsConstraints.gridx = 1;		prescriptionOrderPanelsConstraints.fill = GridBagConstraints.HORIZONTAL;		prescriptionOrderPanelsConstraints.weightx = 1;		prescriptionOrderSignatureJPanel.add(prescriptionOrderSignatureJTextField, prescriptionOrderPanelsConstraints);		prescriptionOrderJPanel.setBorder(SystemWindow.paperBorder);		prescriptionOrderHeaderJPanel.setOpaque(false);		prescriptionOrderHeaderJPanel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(85, 85, 85)));		prescriptionOrderOrderingPhysicianContentJLabel.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15));		prescriptionOrderProvidorRxSymbolJLabel.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 36));		prescriptionOrderHeaderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		prescriptionOrderHeaderPanelConstraints.weightx = 1;		prescriptionOrderHeaderPanelConstraints.anchor = GridBagConstraints.WEST;		prescriptionOrderHeaderPanelConstraints.insets = new Insets(0, 0, 0, 9);		prescriptionOrderHeaderPanelConstraints.gridheight = 4;		prescriptionOrderHeaderJPanel.add(prescriptionOrderProvidorRxSymbolJLabel, prescriptionOrderHeaderPanelConstraints);		prescriptionOrderHeaderPanelConstraints.gridx = 1;		prescriptionOrderHeaderPanelConstraints.gridheight = 1;		prescriptionOrderHeaderPanelConstraints.insets = new Insets(0, 0, 0, 6);		prescriptionOrderHeaderJPanel.add(prescriptionOrderOrderingPhysicianContentJLabel, prescriptionOrderHeaderPanelConstraints);		prescriptionOrderHeaderPanelConstraints.gridx = 2;		prescriptionOrderHeaderPanelConstraints.insets = new Insets(0, 0, 0, 0);		prescriptionOrderHeaderJPanel.add(prescriptionOrderProvidorPhoneContentJLabel, prescriptionOrderHeaderPanelConstraints);		prescriptionOrderHeaderPanelConstraints.gridy = 1;		prescriptionOrderHeaderPanelConstraints.gridx = 1;		prescriptionOrderHeaderPanelConstraints.insets = new Insets(0, 0, 0, 6);		prescriptionOrderHeaderJPanel.add(prescriptionOrderHeaderFacilityIdentifierJLabel, prescriptionOrderHeaderPanelConstraints);		prescriptionOrderHeaderPanelConstraints.gridx = 2;		prescriptionOrderHeaderPanelConstraints.insets = new Insets(0, 0, 0, 0);		prescriptionOrderHeaderJPanel.add(prescriptionOrderProvidorFaxContentJLabel, prescriptionOrderHeaderPanelConstraints);		prescriptionOrderHeaderPanelConstraints.gridx = 1;		prescriptionOrderHeaderPanelConstraints.gridy = 2;		prescriptionOrderHeaderPanelConstraints.gridwidth = 2;		prescriptionOrderHeaderJPanel.add(prescriptionOrderFacilityAddressJLabel, prescriptionOrderHeaderPanelConstraints);		prescriptionOrderPanelConstraints.weightx = 1;		prescriptionOrderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		prescriptionOrderPanelConstraints.insets = new Insets(12, 12, 0, 12);		prescriptionOrderJPanel.add(prescriptionOrderHeaderJPanel, prescriptionOrderPanelConstraints);		prescriptionOrderPanelConstraints.gridy = 1;		prescriptionOrderPanelConstraints.insets = new Insets(12, 12, 0, 12);		prescriptionOrderJPanel.add(prescriptionOrderDrugJPanel, prescriptionOrderPanelConstraints);		prescriptionOrderPanelConstraints.gridy = 2;		prescriptionOrderPanelConstraints.insets = new Insets(0, 12, 3, 12);		prescriptionOrderJPanel.add(prescriptionOrderDispenseJPanel, prescriptionOrderPanelConstraints);		prescriptionOrderPanelConstraints.gridy = 3;		prescriptionOrderPanelConstraints.gridwidth = 2;		prescriptionOrderPanelConstraints.insets = new Insets(3, 12, 3, 12);		prescriptionOrderJPanel.add(prescriptionOrderRefillsAndVoidDateJPanel, prescriptionOrderPanelConstraints);		prescriptionOrderPanelConstraints.gridy = 4;		prescriptionOrderJPanel.add(prescriptionOrderAlertJPanel, prescriptionOrderPanelConstraints);		prescriptionOrderPanelConstraints.gridy = 5;		prescriptionOrderJPanel.add(prescriptionOrderCommentJPanel, prescriptionOrderPanelConstraints);		prescriptionOrderPanelConstraints.gridy = 6;		prescriptionOrderPanelConstraints.insets = new Insets(3, 12, 3, 12);		prescriptionOrderJPanel.add(prescriptionOrderDispenseAsWrittenAndPatientReportedJPanel, prescriptionOrderPanelConstraints);		prescriptionOrderPanelConstraints.gridy = 7;		prescriptionOrderJPanel.add(prescriptionOrderPharmacyJPanel, prescriptionOrderPanelConstraints);		prescriptionOrderPanelConstraints.gridy = 8;		prescriptionOrderPanelConstraints.insets = new Insets(3, 12, 12, 12);		prescriptionOrderJPanel.add(prescriptionOrderSignatureJPanel, prescriptionOrderPanelConstraints);		chartCoverTabJButton.setMnemonic('V');		chartCoverTabJButton.setFont(new Font("arial", Font.BOLD, 15));		chartCoverTabJButton.setOpaque(false);		chartCoverTabJButton.setRolloverEnabled(false);		chartCoverTabJButton.setFocusPainted(false);		chartCoverTabJButton.addActionListener(this);		chartCoverTabJButton.setActionCommand("chartCoverTabJButton");		chartCoverTabJButton.setBorder(null);		chartCoverTabJButton.setIcon(coverOpenedImageIcon);		chartCoverTabJButton.setHorizontalTextPosition(SwingConstants.CENTER);		activitiesTabJButton.setMnemonic('R');		activitiesTabJButton.setFont(new Font("arial", Font.BOLD, 15));		activitiesTabJButton.setOpaque(false);		activitiesTabJButton.setRolloverEnabled(false);		activitiesTabJButton.setFocusPainted(false);		activitiesTabJButton.addActionListener(this);		activitiesTabJButton.setHorizontalTextPosition(SwingConstants.CENTER);		activitiesTabJButton.setActionCommand("activitiesTabJButton");		activitiesTabJButton.setBorder(null);		activitiesTabJButton.setIcon(ordersClosedImageIcon);		activitiesTabJButton.setHorizontalTextPosition(SwingConstants.CENTER);		insuranceTabJButton.setMnemonic('I');		insuranceTabJButton.setFont(new Font("arial", Font.BOLD, 15));		insuranceTabJButton.setRolloverEnabled(false);		insuranceTabJButton.setFocusPainted(false);		insuranceTabJButton.addActionListener(this);		insuranceTabJButton.setActionCommand("insuranceTabJButton");		insuranceTabJButton.setBorder(null);		insuranceTabJButton.setIcon(insuranceClosedImageIcon);		insuranceTabJButton.setHorizontalTextPosition(SwingConstants.CENTER);		insuranceTabJButton.setOpaque(false);		demographicsTabJButton.setMnemonic('D');		demographicsTabJButton.setFont(new Font("arial", Font.BOLD, 15));		demographicsTabJButton.setOpaque(false);		demographicsTabJButton.setRolloverEnabled(false);		demographicsTabJButton.setFocusPainted(false);		demographicsTabJButton.addActionListener(this);		demographicsTabJButton.setActionCommand("demographicsTabJButton");		demographicsTabJButton.setBorder(null);		demographicsTabJButton.setIcon(demographicsClosedLeftOpenedImageIcon);		demographicsTabJButton.setHorizontalTextPosition(SwingConstants.CENTER);		historyTabJButton.setMnemonic('H');		historyTabJButton.setFont(new Font("arial", Font.BOLD, 15));		historyTabJButton.setOpaque(false);		historyTabJButton.setRolloverEnabled(false);		historyTabJButton.setFocusPainted(false);		historyTabJButton.addActionListener(this);		historyTabJButton.setActionCommand("historyTabJButton");		historyTabJButton.setBorder(null);		historyTabJButton.setIcon(historyClosedImageIcon);		historyTabJButton.setHorizontalTextPosition(SwingConstants.CENTER);		chartShortcutTabsJButton.setMnemonic('H');		chartShortcutTabsJButton.setFont(new Font("arial", Font.BOLD, 15));		chartShortcutTabsJButton.setOpaque(false);		chartShortcutTabsJButton.setRolloverEnabled(false);		chartShortcutTabsJButton.setFocusPainted(false);		chartShortcutTabsJButton.addActionListener(this);		chartShortcutTabsJButton.setActionCommand("chartShortcutTabsJButton");		chartShortcutTabsJButton.setBorder(null);		chartShortcutTabsJButton.setHorizontalTextPosition(SwingConstants.CENTER);		viewMedicalFormsDetailsJToggleButton.setMnemonic('H');		viewMedicalFormsDetailsJToggleButton.setName("viewMedicalFormsDetailsJToggleButton");		viewMedicalFormsDetailsJToggleButton.setBackground(new Color(255, 190, 180, 88));		viewMedicalFormsDetailsJToggleButton.setFont(new Font("arial", Font.BOLD, 17));		viewMedicalFormsDetailsJToggleButton.setOpaque(false);		viewMedicalFormsDetailsJToggleButton.setRolloverEnabled(false);		viewMedicalFormsDetailsJToggleButton.setFocusPainted(false);		viewMedicalFormsDetailsJToggleButton.addActionListener(this);		viewMedicalFormsDetailsJToggleButton.setActionCommand("viewMedicalFormsDetailsJToggleButton");		viewMedicalFormsDetailsJToggleButton.setBorder(null);		viewMedicalFormsDetailsJToggleButton.setForeground(Color.WHITE);		viewMedicalFormsDetailsJToggleButton.setHorizontalTextPosition(SwingConstants.CENTER);		chartShortcutTabsJPanel.setMinimumSize(new Dimension(chartShortcutTabsJButton.getWidth(), 1));		shortcutTabNameJTextField.setBackground(new Color(255, 255, 255));		shortcutTabNameJTextField.setOpaque(true);		shortcutTabNameJTextField.addActionListener(this);		shortcutTabNameJTextField.setActionCommand("shortcutTabNameJTextField");		chartShortcutTabsPanelConstraints.gridy = 0;		chartShortcutTabsPanelConstraints.gridx = 0;		chartShortcutTabsPanelConstraints.insets = new Insets(6, 6, 0, 6);		chartShortcutTabsJPanel.add(shortcutTabCommentJLabel, chartShortcutTabsPanelConstraints);		chartShortcutTabsPanelConstraints.gridy = 1;		chartShortcutTabsPanelConstraints.weightx = 1;		chartShortcutTabsPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		chartShortcutTabsPanelConstraints.insets = new Insets(0, 6, 0, 6);		chartShortcutTabsJPanel.add(shortcutTabNameJTextField, chartShortcutTabsPanelConstraints);		chartShortcutTabsPanelConstraints.gridy = 2;		chartShortcutTabsJPanel.add(chartShortcutTabsInnerJPanel, chartShortcutTabsPanelConstraints);		shortcutTabJPopupMenu.add(chartShortcutTabsPanelJScrollPane);		tabButtonsJPanel.setBackground(new Color(0, 0, 255, 0));		topButtonsPanelConstraints.gridx = 0;		topButtonsPanelConstraints.fill = GridBagConstraints.BOTH;		topButtonsPanelConstraints.weighty = 1;		tabButtonsJPanel.add(chartCoverTabJButton, topButtonsPanelConstraints);		topButtonsPanelConstraints.gridx = 1;		tabButtonsJPanel.add(demographicsTabJButton, topButtonsPanelConstraints);		topButtonsPanelConstraints.gridx = 2;		tabButtonsJPanel.add(activitiesTabJButton, topButtonsPanelConstraints);		topButtonsPanelConstraints.gridx = 3;		tabButtonsJPanel.add(historyTabJButton, topButtonsPanelConstraints);		topButtonsPanelConstraints.gridx = 4;		tabButtonsJPanel.add(insuranceTabJButton, topButtonsPanelConstraints);		topButtonsPanelConstraints.gridx = 5;		tabButtonsJPanel.add(chartShortcutTabsJButton, topButtonsPanelConstraints);		topButtonsPanelConstraints.gridx = 6;		tabButtonsJPanel.add(viewMedicalFormsDetailsJToggleButton, topButtonsPanelConstraints);		chartCoverJScrollPane.getVerticalScrollBar().setUnitIncrement(25);		chartCoverJScrollPane.setOpaque(true);		chartCoverJScrollPane.setBackground(Color.MAGENTA);		chartCoverJScrollPane.setBorder(null);		demographicsJScrollPane.getVerticalScrollBar().setUnitIncrement(25);		demographicsJScrollPane.setOpaque(true);		demographicsJScrollPane.setBackground(Color.ORANGE);		demographicsJScrollPane.setBorder(null);		activitiesJScrollPane.getVerticalScrollBar().setUnitIncrement(25);		activitiesJScrollPane.setOpaque(true);		activitiesJScrollPane.setBackground(Color.ORANGE);		activitiesJScrollPane.setBorder(null);		insuranceJScrollPane.getVerticalScrollBar().setUnitIncrement(25);		insuranceJScrollPane.setOpaque(true);		insuranceJScrollPane.setBackground(Color.ORANGE);		insuranceJScrollPane.setBorder(null);		historyJScrollPane.getVerticalScrollBar().setUnitIncrement(25);		historyJScrollPane.setOpaque(true);		historyJScrollPane.setBackground(Color.ORANGE);		historyJScrollPane.setBorder(null);		cardedChartContentJPanel.setBackground(Color.GREEN);		cardedChartContentJPanel.add(chartCoverJScrollPane, "chartCoverJScrollPane");		cardedChartContentJPanel.add(demographicsJScrollPane, "demographicsJScrollPane");		cardedChartContentJPanel.add(activitiesJScrollPane, "activitiesJScrollPane");		cardedChartContentJPanel.add(historyJScrollPane, "historyJScrollPane");		cardedChartContentJPanel.add(insuranceJScrollPane, "insuranceJScrollPane");		signOffJButton.addActionListener(this);		signOffJButton.setActionCommand("signOffJButton");		signOffJButton.setBackground(signOffButtonEnabledColor);		signOffJButton.setRolloverEnabled(false);		signOffJButton.setEnabled(false);		signOffJButton.setBorder(null);		signOffJButton.setOpaque(false);		closeChartJButton.addActionListener(this);		closeChartJButton.setActionCommand("closeChartJButton");		closeChartJButton.setMnemonic('C');		closeChartJButton.setFocusPainted(false);		closeChartJButton.setBorder(null);		closeChartJButton.setRolloverEnabled(false);		closeChartJButton.setOpaque(false);		summaryAndDischargePapersJButton.addActionListener(this);		summaryAndDischargePapersJButton.setBorder(null);		summaryAndDischargePapersJButton.setFocusPainted(false);		summaryAndDischargePapersJButton.setActionCommand("summaryAndDischargePapersJButton");		summaryAndDischargePapersJButton.setMnemonic('S');		summaryAndDischargePapersJButton.setRolloverEnabled(false);		summaryAndDischargePapersJButton.setOpaque(false);		findJButton.addActionListener(this);		findJButton.setBorder(null);		findJButton.setFocusPainted(false);		findJButton.setActionCommand("findJButton");		findJButton.setMnemonic('F');		findJButton.setRolloverEnabled(false);		findJButton.setOpaque(false);		notePadJButton.addActionListener(this);		notePadJButton.setActionCommand("notePadJButton");		notePadJButton.setBorder(null);		notePadJButton.setFocusPainted(false);		notePadJButton.setMnemonic('O');		notePadJButton.setRolloverEnabled(false);		notePadJButton.setOpaque(false);		openChartViaRecentlyOpenedJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		openChartJButton.addActionListener(this);		openChartJButton.setActionCommand("openChartJButton");		openChartJButton.setRolloverEnabled(false);		openChartJButton.setFocusPainted(false);		openChartJButton.setMnemonic('O');		openChartJButton.setBorder(null);		openChartJButton.setName("openChartJButton");		openChartJButton.setOpaque(false);		openChartJPopupMenu.setLayout(new GridBagLayout());		openChartJPopupMenu.setBackground(SystemWindow.quintessentialThemeColor);		openChartJPopupMenu.setBorder(popupBorder);		openChartPopupMenuConstraints.anchor = GridBagConstraints.WEST;		openChartPopupMenuConstraints.insets = new Insets(9, 9, 9, 9);		openChartJPopupMenu.add(openChartViaChartIDJLabel, openChartPopupMenuConstraints);		openChartPopupMenuConstraints.gridx = 1;		openChartPopupMenuConstraints.insets = new Insets(9, 0, 9, 9);		openChartJPopupMenu.add(openChartViaChartIDJTextField, openChartPopupMenuConstraints);		openChartPopupMenuConstraints.gridy = 1;		openChartPopupMenuConstraints.gridx = 0;		openChartPopupMenuConstraints.insets = new Insets(0, 9, 9, 9);		openChartJPopupMenu.add(openChartViaPatientIdentifiersPatientNameJLabel, openChartPopupMenuConstraints);		openChartPopupMenuConstraints.gridx = 1;		openChartPopupMenuConstraints.insets = new Insets(0, 0, 9, 9);		openChartJPopupMenu.add(openChartViaPatientIdentifiersPatientNameJTextField, openChartPopupMenuConstraints);		openChartPopupMenuConstraints.gridy = 2;		openChartPopupMenuConstraints.gridx = 0;		openChartPopupMenuConstraints.insets = new Insets(0, 9, 9, 9);		openChartJPopupMenu.add(openChartViaPatientIdentifiersPatientDriversLicenseJLabel, openChartPopupMenuConstraints);		openChartPopupMenuConstraints.gridx = 1;		openChartPopupMenuConstraints.insets = new Insets(0, 0, 9, 9);		openChartJPopupMenu.add(openChartViaPatientIdentifiersPatientDriversLicenseJTextField, openChartPopupMenuConstraints);		openChartPopupMenuConstraints.gridy = 3;		openChartPopupMenuConstraints.gridx = 0;		openChartPopupMenuConstraints.insets = new Insets(0, 9, 9, 9);		openChartJPopupMenu.add(openChartViaPatientIdentifiersPatientSocialSecurityJLabel, openChartPopupMenuConstraints);		openChartPopupMenuConstraints.gridx = 1;		openChartPopupMenuConstraints.insets = new Insets(0, 0, 9, 9);		openChartJPopupMenu.add(openChartViaPatientIdentifiersPatientSocialSecurityJTextField, openChartPopupMenuConstraints);		openChartPopupMenuConstraints.gridy = 4;		openChartPopupMenuConstraints.gridx = 0;		openChartPopupMenuConstraints.insets = new Insets(0, 9, 9, 9);		openChartJPopupMenu.add(openChartViaURLJLabel, openChartPopupMenuConstraints);		openChartPopupMenuConstraints.gridx = 1;		openChartPopupMenuConstraints.insets = new Insets(0, 0, 9, 9);		openChartJPopupMenu.add(openChartViaURLJTextField, openChartPopupMenuConstraints);		openChartPopupMenuConstraints.gridy = 5;		openChartPopupMenuConstraints.gridx = 0;		openChartPopupMenuConstraints.fill = GridBagConstraints.BOTH;		openChartPopupMenuConstraints.weightx = 1;		openChartPopupMenuConstraints.gridwidth = 3;		openChartPopupMenuConstraints.insets = new Insets(0, 9, 9, 9);		openChartJPopupMenu.add(openChartViaRecentlyOpenedJScrollPane, openChartPopupMenuConstraints);		openChartViaPatientIdentifiersPatientNameJTextField.addActionListener(this);		openChartViaPatientIdentifiersPatientNameJTextField.setActionCommand("openChartViaPatientIdentifiersPatientNameJTextField");		exportCoverYesJRadioButton.setSelected(true);		exportCoverYesJRadioButton.addActionListener(this);		exportCoverYesJRadioButton.setActionCommand("exportCoverYesJToggleButton");		exportCoverYesJRadioButton.setBorder(new LineBorder(new Color(0, 0, 0, 128), 1));		exportCoverNoJRadioButton.setSelected(false);		exportCoverNoJRadioButton.addActionListener(this);		exportCoverNoJRadioButton.setActionCommand("exportCoverNoJRadioButton");		exportCoverNoJRadioButton.setBorder(new LineBorder(new Color(0, 0, 0, 128), 1));		exportCoverButtonsPanelConstraints.insets = new Insets(0, 3, 0, 3);		exportCoverButtonsPanelConstraints.weighty = 1;		exportCoverButtonsPanelConstraints.weightx = 1;		exportCoverButtonsPanelConstraints.fill = GridBagConstraints.BOTH;		exportCoverButtonsJPanel.add(exportCoverYesJRadioButton, exportCoverButtonsPanelConstraints);		exportCoverButtonsPanelConstraints.gridx = 1;		exportCoverButtonsJPanel.add(exportCoverNoJRadioButton, exportCoverButtonsPanelConstraints);		exportPanelHeaderJLabel1.setBorder(new MatteBorder(0, 0, 2, 0, new Color(92, 92, 92, 128)));		exportPopupMenuConstraints.anchor = GridBagConstraints.EAST;		exportPopupMenuConstraints.gridy = 0;		exportPopupMenuConstraints.gridx = 0;		exportPopupMenuConstraints.gridwidth = 5;		exportPopupMenuConstraints.weightx = 1;		exportPopupMenuConstraints.fill = GridBagConstraints.HORIZONTAL;		exportPopupMenuConstraints.insets = new Insets(4, 4, 0, 4);		exportJPopupMenu.setLayout(new GridBagLayout());		exportJPopupMenu.setBackground(SystemWindow.quintessentialThemeColor);		exportJPopupMenu.setBorder(popupBorder);		exportJPopupMenu.add(exportPanelHeaderJLabel1, exportPopupMenuConstraints);		exportPopupMenuConstraints.anchor = GridBagConstraints.CENTER;		exportPopupMenuConstraints.insets = new Insets(0, 4, 4, 4);		exportPopupMenuConstraints.gridy = 1;		exportPopupMenuConstraints.gridwidth = 3;		exportPopupMenuConstraints.weightx = 0;		exportPopupMenuConstraints.fill = GridBagConstraints.NONE;		exportJPopupMenu.add(exportCoverJLabel, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridy = 2;		exportJPopupMenu.add(exportDemographicsJLabel, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridy = 3;		exportJPopupMenu.add(exportHistoryJLabel, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridy = 4;		exportJPopupMenu.add(exportOrdersJLabel, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridy = 5;		exportJPopupMenu.add(exportInsuranceJLabel, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridx = 3;		exportPopupMenuConstraints.gridy = 1;		exportPopupMenuConstraints.fill = GridBagConstraints.HORIZONTAL;		exportJPopupMenu.add(exportCoverButtonsJPanel, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridy = 2;		exportJPopupMenu.add(exportDemographicsJTextField, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridy = 3;		exportJPopupMenu.add(exportOrdersJTextField, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridy = 4;		exportJPopupMenu.add(exportHistoryJTextField, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridy = 5;		exportJPopupMenu.add(exportInsuranceJTextField, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridy = 6;		exportPopupMenuConstraints.gridx = 0;		exportPopupMenuConstraints.gridwidth = 2;		exportJPopupMenu.add(exportPrintableDocumentJLabel, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridx = 2;		exportPopupMenuConstraints.gridwidth = 1;		exportHL7MessageJButton.addActionListener(this);		exportHL7MessageJButton.setActionCommand("exportHL7MessageJButton");		exportPopupMenuConstraints.gridwidth = 1;		exportPopupMenuConstraints.gridx = 2;		exportJPopupMenu.add(exportPdfJButton, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridx = 3;		exportJPopupMenu.add(exportHtmlJButton, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridy = 9;		exportPopupMenuConstraints.gridx = 0;		exportPopupMenuConstraints.gridwidth = 5;		exportJPopupMenu.add(exportHL7MessageJButton, exportPopupMenuConstraints);		exportPopupMenuConstraints.gridy = 10;		exportJPopupMenu.add(exportNowJButton, exportPopupMenuConstraints);		exportNowJButton.addActionListener(this);		exportNowJButton.setActionCommand("exportNowJButton");		exportJButton.addActionListener(this);		exportJButton.setActionCommand("exportJButton");		exportJButton.setRolloverEnabled(false);		exportJButton.setOpaque(false);		exportJButton.setMnemonic('E');		exportJButton.setBorder(null);		printCoverYesJRadioButton.setSelected(true);		printCoverYesJRadioButton.addActionListener(this);		printCoverYesJRadioButton.setActionCommand("printCoverYesJRadioButton");		printCoverNoJRadioButton.setSelected(false);		printCoverNoJRadioButton.addActionListener(this);		printCoverNoJRadioButton.setActionCommand("printCoverNoJRadioButton");		printCoverButtonsPanelConstraints.insets = new Insets(0, 3, 0, 3);		printCoverButtonsPanelConstraints.weighty = 1;		printCoverButtonsPanelConstraints.weightx = 1;		printCoverButtonsPanelConstraints.fill = GridBagConstraints.BOTH;		printCoverButtonsJPanel.add(printCoverYesJRadioButton, printCoverButtonsPanelConstraints);		printCoverButtonsPanelConstraints.gridx = 1;		printCoverButtonsJPanel.add(printCoverNoJRadioButton, printCoverButtonsPanelConstraints);		printPanelHeaderJLabel2.setBorder(new MatteBorder(0, 0, 2, 0, new Color(92, 92, 92, 128)));		printPopupMenuConstraints.anchor = GridBagConstraints.EAST;		printPopupMenuConstraints.gridy = 0;		printPopupMenuConstraints.gridx = 0;		printPopupMenuConstraints.gridwidth = 2;		printPopupMenuConstraints.weightx = 1;		printPopupMenuConstraints.fill = GridBagConstraints.HORIZONTAL;		printPopupMenuConstraints.insets = new Insets(4, 4, 0, 4);		printJPopupMenu.setLayout(new GridBagLayout());		printJPopupMenu.setBackground(SystemWindow.quintessentialThemeColor);		printJPopupMenu.setBorder(popupBorder);		printJPopupMenu.add(printPanelHeaderJLabel1, printPopupMenuConstraints);		printPopupMenuConstraints.gridy = 1;		printPopupMenuConstraints.anchor = GridBagConstraints.CENTER;		printPopupMenuConstraints.ipady = 8;		printPopupMenuConstraints.insets = new Insets(0, 4, 4, 4);		printJPopupMenu.add(printPanelHeaderJLabel2, printPopupMenuConstraints);		printPopupMenuConstraints.gridy = 2;		printPopupMenuConstraints.gridwidth = 1;		printPopupMenuConstraints.ipady = 0;		printPopupMenuConstraints.weightx = 0;		printPopupMenuConstraints.fill = GridBagConstraints.NONE;		printJPopupMenu.add(printCoverJLabel, printPopupMenuConstraints);		printPopupMenuConstraints.gridy = 3;		printJPopupMenu.add(printDemographicsJLabel, printPopupMenuConstraints);		printPopupMenuConstraints.gridy = 4;		printJPopupMenu.add(printHistoryJLabel, printPopupMenuConstraints);		printPopupMenuConstraints.gridy = 5;		printJPopupMenu.add(printActivitiesJLabel, printPopupMenuConstraints);		printPopupMenuConstraints.gridy = 6;		printJPopupMenu.add(printInsuranceJLabel, printPopupMenuConstraints);		printPopupMenuConstraints.gridx = 1;		printPopupMenuConstraints.gridy = 2;		printPopupMenuConstraints.fill = GridBagConstraints.HORIZONTAL;		printJPopupMenu.add(printCoverButtonsJPanel, printPopupMenuConstraints);		printPopupMenuConstraints.gridy = 3;		printJPopupMenu.add(printDemographicsJTextField, printPopupMenuConstraints);		printPopupMenuConstraints.gridy = 4;		printJPopupMenu.add(printordersJTextField, printPopupMenuConstraints);		printPopupMenuConstraints.gridy = 5;		printJPopupMenu.add(printHistoryJTextField, printPopupMenuConstraints);		printPopupMenuConstraints.gridy = 6;		printJPopupMenu.add(printInsuranceJTextField, printPopupMenuConstraints);		printPopupMenuConstraints.gridy = 7;		printPopupMenuConstraints.gridx = 0;		printPopupMenuConstraints.gridwidth = 2;		printJPopupMenu.add(printNowJButton, printPopupMenuConstraints);		printNowJButton.addActionListener(this);		printNowJButton.setActionCommand("printNowJButton");		printJButton.setMnemonic('P');		printJButton.addActionListener(this);		printJButton.setActionCommand("printJButton");		printJButton.setRolloverEnabled(false);		printJButton.setBorder(null);		printJButton.setOpaque(false);		openChartViaChartIDJTextField.addActionListener(this);		openChartViaChartIDJTextField.setActionCommand("openChartViaChartIDJTextField");		openChartViaURLJTextField.addActionListener(this);		openChartViaURLJTextField.setActionCommand("openChartViaURLJTextField");		closeChartSignoffAndCloseJButton.addActionListener(this);		closeChartWithoutSigningOffJButton.addActionListener(this);		closeChartToggleThroughUnsignedFieldsJButton.addActionListener(this);		closeChartToggleThroughUnprocessedFieldsJButton.addActionListener(this);		closeChartSignoffAndCloseJButton.setActionCommand("closeChartSignoffAndCloseJButton");		closeChartWithoutSigningOffJButton.setActionCommand("closeChartWithoutSigningOffJButton");		closeChartToggleThroughUnsignedFieldsJButton.setActionCommand("closeChartToggleThroughUnsignedFieldsJButton");		closeChartToggleThroughUnprocessedFieldsJButton.setActionCommand("closeChartToggleThroughUnprocessedFieldsJButton");		closingPromptJPopupMenu.setLayout(new GridBagLayout());		closingPromptJPopupMenu.setBorder(popupBorder);		closingPromptPopupMenuConstraints.gridwidth = 3;		closingPromptPopupMenuConstraints.insets = new Insets(9, 9, 0, 9);		closingPromptJPopupMenu.add(specialCloseChartJLabel, closingPromptPopupMenuConstraints);		closingPromptPopupMenuConstraints.gridx = 1;		closingPromptPopupMenuConstraints.gridwidth = 1;		closingPromptPopupMenuConstraints.insets = new Insets(9, 9, 9, 9);		closingPromptJPopupMenu.add(closeChartSignoffAndCloseJButton, closingPromptPopupMenuConstraints);		closingPromptPopupMenuConstraints.gridx = 2;		closingPromptPopupMenuConstraints.insets = new Insets(9, 0, 9, 9);		closingPromptJPopupMenu.add(closeChartWithoutSigningOffJButton, closingPromptPopupMenuConstraints);		promptToReplaceDataItemYesJButton.addActionListener(this);		promptToReplaceDataItemYesJButton.setActionCommand("promptToReplaceDataItemYesJButton");		promptToReplaceDataItemNoJButton.addActionListener(this);		promptToReplaceDataItemNoJButton.setActionCommand("promptToReplaceDataItemNoJButton");		promptToReplaceDataItemJPopupMenu.addFocusListener(this);		promptToReplaceDataItemJPopupMenu.setBorder(promptToReplaceDataItemPopupMenuBorder);		promptToReplaceDataItemJPopupMenu.setBackground(SystemWindow.lightQuintessentialThemeColor);		promptToReplaceDataItemJPopupMenu.setName("promptToReplaceDataItemJPopupMenu");		promptToReplaceDataItemJPopupMenu.setLayout(new GridBagLayout());		promptToReplaceDataItemPopupMenuConstraints.gridy = 0;		promptToReplaceDataItemPopupMenuConstraints.gridx = 0;		promptToReplaceDataItemPopupMenuConstraints.weightx = 1;		promptToReplaceDataItemPopupMenuConstraints.gridwidth = 2;		promptToReplaceDataItemPopupMenuConstraints.insets = new Insets(6, 6, 0, 6);		promptToReplaceDataItemJPopupMenu.add(promptToReplaceDataItem1JLabel, promptToReplaceDataItemPopupMenuConstraints);		promptToReplaceDataItemPopupMenuConstraints.gridy = 1;		promptToReplaceDataItemPopupMenuConstraints.insets = new Insets(0, 6, 6, 6);		promptToReplaceDataItemJPopupMenu.add(promptToReplaceDataItem2JLabel, promptToReplaceDataItemPopupMenuConstraints);		promptToReplaceDataItemPopupMenuConstraints.gridy = 2;		promptToReplaceDataItemJPopupMenu.add(promptToReplaceDataItem3JLabel, promptToReplaceDataItemPopupMenuConstraints);		promptToReplaceDataItemPopupMenuConstraints.gridy = 3;		promptToReplaceDataItemPopupMenuConstraints.gridwidth = 1;		promptToReplaceDataItemPopupMenuConstraints.insets = new Insets(6, 6, 12, 6);		promptToReplaceDataItemJPopupMenu.add(promptToReplaceDataItemYesJButton, promptToReplaceDataItemPopupMenuConstraints);		promptToReplaceDataItemPopupMenuConstraints.gridx = 1;		promptToReplaceDataItemJPopupMenu.add(promptToReplaceDataItemNoJButton, promptToReplaceDataItemPopupMenuConstraints);		templateChoicesPanelConstraints.insets = new Insets(0, 0, 9, 0);		templateChoicesJPanel.add(templateChoicesInnerJPanel, templateChoicesPanelConstraints);		templateChoicesInnerJPanel.setBackground(SystemWindow.quintessentialThemeColor);		templateChoicesJPanel.setBackground(SystemWindow.quintessentialThemeColor);		newChartJPopupMenu.setBorder(popupBorder);		newChartJPopupMenu.add(templateChoicesJScrollPane);		newChartJButton.setMnemonic('N');		newChartJButton.setRolloverEnabled(false);		newChartJButton.setBorder(null);		newChartJButton.addActionListener(this);		newChartJButton.setActionCommand("newChartJButton");		newChartJButton.setOpaque(false);		menuBar.addMouseListener(this);		menuBar.setName("menuBar");		menuBar.setBorder(new BevelBorder(BevelBorder.RAISED));		menuBar.add(newChartJButton);		menuBar.add(openChartJButton);		menuBar.add(exportJButton);		menuBar.add(printJButton);		menuBar.add(signOffJButton);		menuBar.add(closeChartJButton);		menuBar.add(notePadJButton);		menuBar.add(summaryAndDischargePapersJButton);		menuBar.add(findJButton);		setJMenuBar(menuBar);		chartFolderPanelConstraints.gridy = 0;		chartFolderPanelConstraints.gridx = 0;		chartFolderPanelConstraints.anchor = GridBagConstraints.WEST;		chartFolderJPanel.add(tabButtonsJPanel, chartFolderPanelConstraints);		chartFolderPanelConstraints.gridy = 1;		chartFolderPanelConstraints.weighty = 1;		chartFolderPanelConstraints.weightx = 1;		chartFolderPanelConstraints.fill = GridBagConstraints.BOTH;		chartFolderJPanel.add(cardedChartContentJPanel, chartFolderPanelConstraints);		noChartJPanel.setOpaque(false);		noChartJPanel.setBorder(new CompoundBorder(new CompoundBorder(new BevelBorder(BevelBorder.RAISED), new LineBorder(Color.LIGHT_GRAY)), new BevelBorder(BevelBorder.LOWERED)));		chartFolderPanelBaseJPanel.setOpaque(false);		chartFolderPanelBaseJPanel.add(chartFolderJPanel, "chartFolderJPanel");		chartFolderPanelBaseJPanel.add(noChartJPanel, "noChartJPanel");		chartFolderJPanel.setBackground(new Color(0, 0, 0, 0));		mainJPanel.setOpaque(false);		contentJPanel.setOpaque(false);		contentPanelConstraints.weighty = 1;		contentPanelConstraints.weightx = 1;		contentPanelConstraints.fill = GridBagConstraints.BOTH;		contentPanelConstraints.gridy = 0;		contentPanelConstraints.gridx = 0;		chartsContentGlassCoverPanel.setOpaque(false);		chartsContentGlassCoverPanel.setBackground(new Color(160, 160, 160, 0));		contentJPanel.setLayout(new GridBagLayout());		contentJPanel.add(chartFolderPanelBaseJPanel, contentPanelConstraints);		contentJPanel.add(chartsContentGlassCoverPanel, contentPanelConstraints);		hBar = new JScrollBar(JScrollBar.HORIZONTAL);		vBar = new JScrollBar(JScrollBar.VERTICAL);		hBar.setUnitIncrement(40);		hBar.setBlockIncrement(40);		vBar.setUnitIncrement(40);		vBar.setBlockIncrement(40);		hBar.addAdjustmentListener(adjustmentListener);		vBar.addAdjustmentListener(adjustmentListener);	}	public void fillAndPopupTemplateChoicesJScrollPane() {		JButton templateChoicesInnerPanelJButton;		int ind = 1;		templateChoicesInnerJPanel.removeAll();		GridBagConstraints templateChoicesInnerPanelConstraints = new GridBagConstraints();		templateChoicesInnerPanelConstraints.weightx = 1;		templateChoicesInnerPanelConstraints.fill = GridBagConstraints.BOTH;		templateChoicesInnerPanelConstraints.insets = new Insets(9, 9, 0, 9);		while (ind < ((Vector) ((Vector) Access.rootAdministrator.elementAt(3)).elementAt(16)).size()) {			templateChoicesInnerPanelJButton = new JButton(" " + (String) (((Vector) ((Vector) (((Vector) ((Vector) ((Vector) Access.rootAdministrator.elementAt(3)).elementAt(16)).elementAt(ind))).elementAt(0)).elementAt(0)).elementAt(13)) + " ");			templateChoicesInnerPanelConstraints.gridy = ind;			templateChoicesInnerPanelJButton.addActionListener(this);			templateChoicesInnerPanelJButton.setActionCommand("NEWCHARTTEMPLATECHOICE");			templateChoicesInnerPanelJButton.setName(String.valueOf(ind));			templateChoicesInnerPanelJButton.setBackground(SystemWindow.buttonColor);			templateChoicesInnerPanelJButton.setBorder(SystemWindow.buttonBorder);			templateChoicesInnerPanelJButton.setFont(SystemWindow.systemFont);			templateChoicesInnerJPanel.add(templateChoicesInnerPanelJButton, templateChoicesInnerPanelConstraints);			ind++;		}		newChartJPopupMenu.show(newChartJButton, 0, newChartJButton.getHeight());	}	AdjustmentListener adjustmentListener = new AdjustmentListener() {		@Override		public void adjustmentValueChanged(AdjustmentEvent e) {			int x = hBar.getValue();			int y = vBar.getValue();			contentJPanel.setBounds(-x, -y, contentJPanel.getWidth(), contentJPanel.getHeight());			repaint();		}	};	public void makeNewChart(int chartTemplateChoiceIndice) {		if (Access.isUserLoggedIn && !Access.getUser(Access.loggedOnUserID, "chartsActivitiesAuthorization").equals("manage")) {			orderEntryPanelBaseJPanel.setVisible(false);		} else {			orderEntryPanelBaseJPanel.setVisible(true);		}		if (!chartIsOpen && (Access.isRootAdministratorLoggedIn || (Access.getUser(Access.loggedOnUserID, "chartsDemographicsAuthorization").equals("manage") && Access.getUser(Access.loggedOnUserID, "chartsActivitiesAuthorization").equals("manage") && Access.getUser(Access.loggedOnUserID, "chartsHistoryAuthorization").equals("manage") && Access.getUser(Access.loggedOnUserID, "chartsInsuranceAuthorization").equals("manage")))) {			new PatientData().createBlankPatientDataStructWithTemplateAndPutInLoggoffFrame(chartTemplateChoiceIndice);			makeNewPatientIndexObject();			makeChartPages();			try {				Io.out("enc", Access.patientDataStruct, openChartID + "_vitality.dat", foundPatientChartPassword(openChartID));				Io.in("enc", openChartID, foundPatientChartPassword(openChartID));			} catch (Exception e) {				SystemWindow.println("Critical failure writing initial chart to permanent memory in chartingWindow");				e.printStackTrace();			}			needSignOff = true;			System.out.println("makeNewChart(), openChartID: " + openChartID);			recentChartID.add(openChartID);			System.out.println("makeNewChart() recentChartID.size(): " + recentChartID.size());			int ind = 0;			while (ind < recentChartID.size() - 1) {				if (((String) recentChartID.elementAt(ind)).equals(openChartID)) {					System.out.println("removing preceding duplicate chart ID entry");					recentChartID.remove(ind);				}				ind++;			}			chartIsOpen = true;			validate();			repaint();			addTalkbackText("New chart " + openChartID + " created and opened.", null, true);		} else if (chartIsOpen & needSignOff) {			addTalkbackText("Please sign off and close the open chart.", null, true);		} else if (chartIsOpen & !needSignOff) {			addTalkbackText("Please close the open chart.", null, true);		} else {			addTalkbackText("All chart authorizations must be \"manage\" to make a new chart", null, true);		}		Device.device.workspace.decisionSupportWindow.createLifeExpectancyPanel();	}	public void closeChart() {		if (chartIsOpen) {			String chartClosureLogString = new Date().toString() + ": chart closed by " + Access.getUserName(openChartID);			((Vector) (((Vector) (((Vector) (((Vector) (Access.rootAdministrator.elementAt(1))).elementAt(0))).elementAt((int) (Integer.parseInt(openChartID))))).elementAt(2))).add(chartClosureLogString);			((Vector) (((Vector) ((Vector) (Access.patientDataStruct.elementAt(3))).elementAt(7)).elementAt(2))).add(chartClosureLogString);			saveChart();			Access.patientDataStruct.clear();			String closedChartID = openChartID;			openChartID = "00000";			chartDescriptionDisplayJTextArea = null;			chartCoverPaneJPanel.removeAll();			demographicsPaneJPanel.removeAll();			activitiesPaneJPanel.removeAll();			historyPaneJPanel.removeAll();			insurancePaneJPanel.removeAll();			chartCoverJPanel.removeAll();			demographicsJPanel.removeAll();			activitiesJPanel.removeAll();			historyJPanel.removeAll();			insuranceJPanel.removeAll();			ordersPanelHeaderPatientNameOutputJLabel.setText("");			ordersPanelHeaderPatientAddressOutputJLabel.setText("");			ordersPanelHeaderPatientPhoneOutputJLabel.setText("");			ordersPanelHeaderPatientBirthTimeAndDateOutputJLabel.setText("");			ordersPanelHealthRecordOutputJLabel.setText("");			ordersPanelHeaderPayorOutputJLabel.setText("");			ordersPanelHeaderProviderOutputJLabel.setText("");			ordersPanelHeaderPatientSexOutputJLabel.setText("");			signOffJButton.setOpaque(true);			signOffJButton.setEnabled(false);			chartFolderPanelBasePanelCardLayout.show(chartFolderPanelBaseJPanel, "noChartJPanel");			chartIsOpen = false;			Device.device.workspace.decisionSupportWindow.actuarialLifeExpectancyJToggleButton.doClick();			Access.patientDataStruct = new Vector();			addTalkbackText("Chart " + closedChartID + " closed.", null, true);			validate();			repaint();		} else {			addTalkbackText("There is no open chart to close.", null, true);		}	}	@Override	public void mouseClicked(MouseEvent m) {		if (m.getComponent().getName().equals("titleBarCloseJButton")) {			super.mouseClicked(m);		} else if (m.getComponent().getName().startsWith("timeStampCalendarAmPmJTextField")) {			if (null != activeCalendarDayOfWeekJTextField.getText() || activeCalendarDayOfWeekJTextField.getText().equals("")) {				rollAndFill(null, 0);			}			if (activeCalendarAMPMJTextField.getText().equals("AM")) {				activeCalendarAMPMJTextField.setForeground(Color.WHITE);				activeCalendarAMPMJTextField.setFont(SystemWindow.systemFont);				activeCalendarAMPMJTextField.setText("PM");			} else if (activeCalendarAMPMJTextField.getText().equals("PM")) {				activeCalendarAMPMJTextField.setForeground(Color.LIGHT_GRAY);				activeCalendarAMPMJTextField.setFont(appointmentsAmPmTextFieldFontWhenDisplaying24HourTime);				activeCalendarAMPMJTextField.setText("24-hr");			} else {				activeCalendarAMPMJTextField.setForeground(Color.WHITE);				activeCalendarAMPMJTextField.setFont(SystemWindow.systemFont);				activeCalendarAMPMJTextField.setText("AM");			}			syncAppointmentCalendarWithTalkback(((JTextField) m.getSource()));		}	}	@Override	public void mousePressed(MouseEvent m) {		super.mousePressed(m);	}	@Override	public void mouseReleased(MouseEvent m) {		super.mouseReleased(m);	}	@Override	public void mouseEntered(MouseEvent m) {	}	@Override	public void mouseExited(MouseEvent m) {	}	@Override	public void actionPerformed(ActionEvent e) {		if (e.getActionCommand().startsWith("promptToReplaceDataItemNoJButton")) {			mainPanelCoverJPanel.setVisible(false);			promptToReplaceDataItemJPopupMenu.setVisible(false);		} else if (e.getActionCommand().startsWith("promptToReplaceDataItemYesJButton")) {			Object focusLostObject;			String focusLostObjectName = focusLostDataCellDisplayObjectWithExtraDataToAddComponent.getName();			int firstDeliminatorIndex = focusLostObjectName.indexOf("|");			int secondDeliminatorIndex = focusLostObjectName.indexOf("|", firstDeliminatorIndex + 1);			int thirdDeliminatorIndex = focusLostObjectName.indexOf("|", secondDeliminatorIndex + 1);			int focusLostObjectChartSection = Integer.parseInt(focusLostObjectName.substring(firstDeliminatorIndex + 1, secondDeliminatorIndex));			int focusLostObjectPageNumber = Integer.parseInt(focusLostObjectName.substring(secondDeliminatorIndex + 1, thirdDeliminatorIndex));			int focusLostObjectItemNumber = Integer.parseInt(focusLostObjectName.substring(thirdDeliminatorIndex + 1, focusLostObjectName.length()));			if (changeDataCellDisplayComponentBackToDesiredValue()) {				String elementDataType = ((String) (((Vector) (((Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(focusLostChartSection))).elementAt(focusLostPageNumber))).elementAt(focusLostItemNumber))).elementAt(1))).elementAt(2)));				String colloquialDataType = ((String) (((Vector) (((Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(focusLostChartSection))).elementAt(focusLostPageNumber))).elementAt(focusLostItemNumber))).elementAt(1))).elementAt(1)));				if (elementDataType.endsWith("TS")) {					focusLostObject = String.valueOf(activeCalendar.getTimeInMillis());				} else if (colloquialDataType.equals("text")) {					focusLostObject = (((JTextComponent) focusLostDataCellDisplayObjectWithExtraDataToAddComponent).getText());				} else {					focusLostObject = (((Container) focusLostDataCellDisplayObjectWithExtraDataToAddComponent).getComponent(0));				}				saveDataItemToPatientDataStruct(focusLostObject, focusLostObjectChartSection, focusLostObjectPageNumber, focusLostObjectItemNumber);			}			mainPanelCoverJPanel.setVisible(false);			promptToReplaceDataItemJPopupMenu.setVisible(false);		} else if (e.getActionCommand().startsWith("timeStampCalendar")) {			syncAppointmentCalendarWithTalkback(((JTextField) e.getSource()));		} else if (e.getActionCommand().equals("activitiesTabJButton")) {			cPTJToggleButton.setBorder(SystemWindow.buttonBorder);			cPTJToggleButton.setBackground(SystemWindow.buttonColor);			iCDJToggleButton.setBorder(SystemWindow.buttonBorder);			iCDJToggleButton.setBackground(SystemWindow.buttonColor);			lOINCJToggleButton.setBorder(SystemWindow.buttonBorder);			lOINCJToggleButton.setBackground(SystemWindow.buttonColor);			hCPCS1JToggleButton.setBorder(SystemWindow.buttonBorder);			hCPCS1JToggleButton.setBackground(SystemWindow.buttonColor);			hCPCS2JToggleButton.setBorder(SystemWindow.buttonBorder);			hCPCS2JToggleButton.setBackground(SystemWindow.buttonColor);			orderSetsJToggleButton.setBorder(SystemWindow.buttonBorder);			orderSetsJToggleButton.setBackground(SystemWindow.buttonColor);			rXNormJToggleButton.setBorder(SystemWindow.buttonBorder);			rXNormJToggleButton.setBackground(SystemWindow.buttonColor);			tabCardLayout.show(cardedChartContentJPanel, "activitiesJScrollPane");			chartCoverTabJButton.setForeground(new Color(141, 120, 75));			demographicsTabJButton.setForeground(new Color(141, 120, 75));			activitiesTabJButton.setForeground(Color.BLACK);			historyTabJButton.setForeground(new Color(141, 120, 75));			insuranceTabJButton.setForeground(new Color(141, 120, 75));			chartCoverTabJButton.setIcon(coverClosedRightClosedImageIcon);			demographicsTabJButton.setIcon(demographicsClosedRightOpenedImageIcon);			activitiesTabJButton.setIcon(ordersOpenedImageIcon);			historyTabJButton.setIcon(historyClosedLeftOpenedImageIcon);			insuranceTabJButton.setIcon(insuranceClosedImageIcon);			if (chartIsOpen) {				Vector patientIndexedInformation = PracticeWindow.getHumanReadablePatientIndexedInformation(Integer.parseInt(openChartID));				ordersPanelHeaderPatientNameOutputJLabel.setText((String) patientIndexedInformation.elementAt(0));				ordersPanelHeaderPatientAddressOutputJLabel.setText((String) patientIndexedInformation.elementAt(1));				ordersPanelHeaderPatientPhoneOutputJLabel.setText((String) patientIndexedInformation.elementAt(2));				ordersPanelHealthRecordOutputJLabel.setText(openChartID);				ordersPanelHeaderPayorOutputJLabel.setText("");				ordersPanelHeaderProviderOutputJLabel.setText(Access.getUserName(openChartID));				ordersPanelHeaderPatientSexOutputJLabel.setText((String) patientIndexedInformation.elementAt(5));			}			validate();			repaint();		} else if (e.getActionCommand().equals("exportHL7MessageJButton")) {			MessagingWindow.sendAsAttachmentToEmail(medicalOutputFile, getPatientURL());		} else if (e.getActionCommand().equals("orderEntryScheduleAndBatchOrderAtTimeJButton")) {			orderEntryScheduleAndBatchOrderAtTimeJPopupMenu.show(orderEntryScheduleAndBatchOrderAtTimeJButton, 0, 0);		} else if (e.getActionCommand().equals("orderEntryScheduleAndBatchOrderOnDateJButton")) {			orderEntryScheduleAndBatchOrderOnDateJPopupMenu.show(orderEntryScheduleAndBatchOrderOnDateJButton, 0, 0);		} else if (e.getActionCommand().equals("newChartJButton")) {			fillAndPopupTemplateChoicesJScrollPane();		} else if (e.getActionCommand().equals("openChartJButton")) {			if (!chartIsOpen) {				fillOpenChartViaRecentlyOpenedPanel();				openChartJPopupMenu.show(openChartJButton, 0, openChartJButton.getHeight());			} else if (chartIsOpen) {				addTalkbackText("Please close the open chart before opening another.", null, true);			}		} else if (e.getActionCommand().startsWith("orderEntryCodeDetailsPopupMenuJButton")) {			orderEntryBottomCardedJPanel.setPreferredSize(new Dimension(orderEntryCodeDetailsPopupMenuButtonBaseJPanel.getWidth() - 4, 225));			orderEntryCodeDetailsJPopupMenu.show(orderEntryCodeDetailsPopupMenuButtonBaseJPanel, 0, orderEntryCodeDetailsPopupMenuButtonBaseJPanel.getHeight());		} else if (e.getActionCommand().startsWith("codeSetRecordColumnJButton")) {			System.out.println("code line is " + ((JButton) (e.getSource())).getActionCommand().substring(27));			medicalCodeDatatype = ((JButton) e.getSource()).getName();			int codeSetVectorInd = (int) (Integer.parseInt(e.getActionCommand().substring(27)));			if (((JButton) e.getSource()).getName().startsWith("LOINC2.32")) {				lOINCOrderPanelMedicalCodeJLabel.setText(" (LOINC V2.32 " + medicalCodeDatatype.substring(10) + ")");				observationAxisComponentContentJTextArea.setText(codeSetVector.elementAt(codeSetVectorInd).elementAt(1).trim());				observationAxisPropertyContentJLabel.setText(codeSetVector.elementAt(codeSetVectorInd).elementAt(2).trim());				observationAxisTimeAspectContentJLabel.setText(codeSetVector.elementAt(codeSetVectorInd).elementAt(3).trim());				observationAxisSystemContentJLabel.setText(codeSetVector.elementAt(codeSetVectorInd).elementAt(4).trim());				observationAxisScaletypeContentJLabel.setText(codeSetVector.elementAt(codeSetVectorInd).elementAt(5).trim());				observationAxisMethodContentJLabel.setText(codeSetVector.elementAt(codeSetVectorInd).elementAt(6).trim());			} else if (((JButton) e.getSource()).getName().startsWith("RXNCONSO09072010")) {				prescriptionOrderPanelMedicalCodeJLabel.setText(" (RxNORM V09072010 " + medicalCodeDatatype.substring(17) + ")");				prescriptionOrderDrugJTextArea.setText(codeSetVector.elementAt(codeSetVectorInd).elementAt(14).trim());			} else if (((JButton) e.getSource()).getName().startsWith("CPT2009")) {				proceduralJTextArea.setText(codeSetVector.elementAt(codeSetVectorInd).elementAt(1).trim());			} else if (((JButton) e.getSource()).getName().startsWith("ICD10")) {				diagnosticJTextArea.setText(codeSetVector.elementAt(codeSetVectorInd).elementAt(1).trim());			}		} else if (e.getActionCommand().equals("recentChartJButton")) {			openChartJPopupMenu.setVisible(false);			openChart(((JButton) e.getSource()).getName());		} else if (e.getActionCommand().equals("chartShortcutTabsJButton")) {			fillChartTabsPanel();		} else if (e.getActionCommand().equals("shortcutTabNameJTextField")) {			if (shortcutTabNameJTextField.getText() != null && focusLostItemNumber != -2) {				SystemWindow.println("shortcutTabNameJTextField");				String[] chartTabLocation = new String[4];				String sectionName = null;				if (focusLostChartSection == 1) {					sectionName = "DEMOGRAPHICS";				} else if (focusLostChartSection == 2) {					sectionName = "ACTIVITIES";				} else if (focusLostChartSection == 3) {					sectionName = "HISTORY";				} else if (focusLostChartSection == 4) {					sectionName = "INSURANCE";				}				chartTabLocation[0] = sectionName;				chartTabLocation[1] = String.valueOf(focusLostPageNumber);				chartTabLocation[2] = String.valueOf(focusLostItemNumber);				chartTabLocation[3] = shortcutTabNameJTextField.getText();				((Vector) (((Vector) ((((Vector) Access.patientDataStruct.elementAt(1))).elementAt(0))).elementAt(17))).add(chartTabLocation);				shortcutTabNameJTextField.setText(null);				focusLostItemNumber = -2;				fillChartTabsPanel();			} else {				addTalkbackText("Please select an item to affix tab to.", null, true);			}		} else if (e.getActionCommand().equals("orderEntryPlaceOrderJButton")) {			if (displayOrdersCardedBasePanelAddedJPanel.getComponentCount() == 1) {				addTalkbackText("Order already added", null, true);			} else {				int ind = 1;				if (cPTJToggleButton.isSelected()) {					Vector<String> procedure = validateProcedural();					String observationTalkback = procedure.elementAt(0);					if (observationTalkback.equals("VALID")) {						procedure.setElementAt("CPT2009", 0);						addTalkbackText("Procedure ordered", null, true);						processOrder(procedure);					} else {						addTalkbackText(observationTalkback, null, true);					}				} else if (iCDJToggleButton.isSelected()) {					Vector<String> diagnosis = validateDiagnostic();					String diagnosticTalkback = diagnosis.elementAt(0);					if (diagnosticTalkback.equals("VALID")) {						diagnosis.setElementAt("ICD10", 0);						addTalkbackText("Diagnosis ordered", null, true);						processOrder(diagnosis);					} else {						addTalkbackText(diagnosticTalkback, null, true);					}				} else if (lOINCJToggleButton.isSelected()) {					Vector<String> observation = validateObservation();					String observationTalkback = observation.elementAt(0);					if (observationTalkback.equals("VALID")) {						observation.setElementAt("LOINC2.32", 0);						addTalkbackText("observation ordered", null, true);						processOrder(observation);					} else {						addTalkbackText(observationTalkback, null, true);					}				} else if (rXNormJToggleButton.isSelected()) {					Vector<String> prescription = validatePrescription();					String prescriptionTalkback = prescription.elementAt(0);					if (prescriptionTalkback.equals("VALID")) {						prescription.setElementAt("RXNCONSO09072010", 0);						addTalkbackText("Biological ordered", null, true);						processOrder(prescription);					} else {						addTalkbackText(prescriptionTalkback, null, true);					}				} else if (hCPCS1JToggleButton.isSelected()) {				}			}		} else if (e.getActionCommand().equals("orderEntryScheduleAndBatchOrderJButton")) {			orderEntryScheduleAndBatchOrderJPopupMenu.show(orderEntryScheduleAndBatchOrderJButton, 0, 0);		} else if (e.getActionCommand().equals("chartIDJButton") | e.getActionCommand().equals("practiceManagementFrame.chartIDJButton")) {			Device.device.workspace.switchActiveWindowTo(this);			openChartJPopupMenu.setVisible(false);			String chartID = ((Component) (e.getSource())).getName();			if (!(chartID = isDataTypeCorrect("openChartViaChartIDJTextField", chartID, "e.getActionCommand().equals(\"chartIDJButton\") | e.getActionCommand().equals(\"practiceManagementFrame.chartIDJButton\")")).equals("false")) {				openChart(((Component) (e.getSource())).getName());			}		} else if (e.getActionCommand().equals("summaryAndDischargePapersJButton")) {			summaryPapers("patient reminders");		} else if (e.getActionCommand().equals("notePadJButton")) {			Device.device.workspace.notePad.setLocation(Device.halfScreenWidth - 300, Device.device.halfScreenHeight - 300);			Device.device.workspace.notePad.setSize(new Dimension(1000, 600));			Device.device.workspace.notePad.setPreferredSize(new Dimension(1000, 600));			Device.device.workspace.notePad.pack();			Device.device.workspace.notePad.setMinimumSize(new Dimension(300, 300));			Device.device.workspace.notePad.setVisible(true);			Device.device.workspace.notePad.moveToFront();			Device.device.workspace.repaint();		} else if (e.getActionCommand().equals("cPTJToggleButton")) {			enableProceduralOrderJPanel(true);			displayOrdersCardedBasePanelAddedJPanel.setOpaque(false);			displayOrdersCardedBasePanelAddedJPanel.remove(displayOrdersCardedBasePanelAddedJLabel);			orderEntryCodeChoicesJPanel.removeAll();			orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel.removeAll();			displayOrdersCardLayout.show(displayOrdersCardedJPanel, "proceduralOrderJPanel");			codeSetIdentifier = "CPT2009";			cPTContentsQueryJTextField.setText("");			cPTCodeQueryJTextField.setText("");			iCDJToggleButton.setSelected(false);			lOINCJToggleButton.setSelected(false);			rXNormJToggleButton.setSelected(false);			hCPCS1JToggleButton.setSelected(false);			hCPCS2JToggleButton.setSelected(false);			orderSetsJToggleButton.setSelected(false);			codeInputTopCardLayout.show(codeInputCardedJPanel, "codeInputTopCardedPanelCPTJPanel");			orderEntryBottomCardLayout.show(orderEntryBottomCardedJPanel, "orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane");			orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane.setColumnHeaderView(orderEntryBottomCardedPanelCPTPanelScrollPaneColumnHeaderJPanel);			addTalkbackText("Order entry - Procedural", null, true);			validate();			repaint();		} else if (e.getActionCommand().equals("iCDJToggleButton")) {			displayOrdersCardedBasePanelAddedJPanel.setOpaque(false);			displayOrdersCardedBasePanelAddedJPanel.remove(displayOrdersCardedBasePanelAddedJLabel);			orderEntryCodeChoicesJPanel.removeAll();			orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel.removeAll();			displayOrdersCardLayout.show(displayOrdersCardedJPanel, "diagnosticOrderJPanel");			codeSetIdentifier = "ICD10";			iCDContentsQueryJTextField.setText("");			iCDCodeQueryJTextField.setText("");			cPTJToggleButton.setSelected(false);			lOINCJToggleButton.setSelected(false);			rXNormJToggleButton.setSelected(false);			hCPCS1JToggleButton.setSelected(false);			hCPCS2JToggleButton.setSelected(false);			orderSetsJToggleButton.setSelected(false);			enableDiagnosticOrderJPanel(true);			codeInputTopCardLayout.show(codeInputCardedJPanel, "codeInputTopCardedPanelICDJPanel");			orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane.setColumnHeaderView(orderEntryBottomCardedPanelICDPanelScrollPaneColumnHeaderJPanel);			orderEntryBottomCardLayout.show(orderEntryBottomCardedJPanel, "orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane");			addTalkbackText("Order entry - Diagnostic", null, true);			validate();			repaint();		} else if (e.getActionCommand().equals("lOINCJToggleButton")) {			codeSetIdentifier = "LOINC2.32";			lOINCContentsQueryJTextField.setText("");			lOINCCodeQueryJTextField.setText("");			cPTJToggleButton.setSelected(false);			iCDJToggleButton.setSelected(false);			rXNormJToggleButton.setSelected(false);			hCPCS1JToggleButton.setSelected(false);			hCPCS2JToggleButton.setSelected(false);			orderSetsJToggleButton.setSelected(false);			enableLOINCOrderJPanel(true);			codeInputTopCardLayout.show(codeInputCardedJPanel, "codeInputTopCardedPanelLOINCJPanel");			orderEntryBottomCardLayout.show(orderEntryBottomCardedJPanel, "orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane");			orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane.setColumnHeaderView(orderEntryBottomCardedPanelLOINCPanelScrollPaneColumnHeaderJPanel);			addTalkbackText("Order entry - Laboratory and clinical observations", null, true);			validate();			repaint();		} else if (e.getActionCommand().equals("rXNormJToggleButton")) {			codeSetIdentifier = "RXNCONSO09072010";			cPTContentsQueryJTextField.setText("");			cPTCodeQueryJTextField.setText("");			cPTJToggleButton.setSelected(false);			iCDJToggleButton.setSelected(false);			lOINCJToggleButton.setSelected(false);			hCPCS1JToggleButton.setSelected(false);			hCPCS2JToggleButton.setSelected(false);			orderSetsJToggleButton.setSelected(false);			enablePrescriptionOrder(true);			codeInputTopCardLayout.show(codeInputCardedJPanel, "codeInputTopCardedPanelRxNormJPanel");			orderEntryBottomCardLayout.show(orderEntryBottomCardedJPanel, "orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane");			orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane.setColumnHeaderView(orderEntryBottomCardedPanelRxNormPanelScrollPaneColumnHeaderJPanel);			addTalkbackText("Order entry - Biologicals", null, true);			validate();			repaint();		} else if (e.getActionCommand().equals("hCPCS1JToggleButton")) {			displayOrdersCardLayout.show(displayOrdersCardedJPanel, "displayOrdersCardedPanelBlankJPanel");			codeSetIdentifier = "HCPCS1";			cPTContentsQueryJTextField.setText("");			cPTCodeQueryJTextField.setText("");			cPTJToggleButton.setSelected(false);			iCDJToggleButton.setSelected(false);			lOINCJToggleButton.setSelected(false);			rXNormJToggleButton.setSelected(false);			hCPCS2JToggleButton.setSelected(false);			orderSetsJToggleButton.setSelected(false);			orderEntryBottomCardLayout.show(orderEntryBottomCardedJPanel, "orderEntryBottomCardedPanelCodedOrderEntryChoicesPanelJScrollPane");			validate();			repaint();		} else if (e.getActionCommand().equals("hCPCS2JToggleButton")) {			displayOrdersCardLayout.show(displayOrdersCardedJPanel, "displayOrdersCardedPanelBlankJPanel");			codeSetIdentifier = "HCPCS2";			cPTContentsQueryJTextField.setText("");			cPTCodeQueryJTextField.setText("");			orderEntryCodeChoicesJPanel.removeAll();			orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel.removeAll();			cPTJToggleButton.setSelected(false);			iCDJToggleButton.setSelected(false);			lOINCJToggleButton.setSelected(false);			rXNormJToggleButton.setSelected(false);			hCPCS1JToggleButton.setSelected(false);			orderSetsJToggleButton.setSelected(false);			orderEntryBottomCardLayout.show(orderEntryBottomCardedJPanel, "ordersChoiceCodeDetailsJScrollPane");			validate();			repaint();		} else if (e.getActionCommand().equals("orderSetsJToggleButton")) {			cPTContentsQueryJTextField.setText("");			cPTCodeQueryJTextField.setText("");			orderEntryCodeChoicesJPanel.removeAll();			orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel.removeAll();			cPTJToggleButton.setSelected(false);			iCDJToggleButton.setSelected(false);			lOINCJToggleButton.setSelected(false);			rXNormJToggleButton.setSelected(false);			hCPCS1JToggleButton.setSelected(false);			hCPCS2JToggleButton.setSelected(false);			orderEntryBottomCardLayout.show(orderEntryBottomCardedJPanel, "orderEntryBottomCardedPanelOrderSetsPanelJScrollPane");			validate();			repaint();		} else if (e.getActionCommand().equals("cPTContentsQueryJTextField")) {			SystemWindow.println(e.getActionCommand());			fillCodeSetQueryReturnJPanels(cPTContentsQueryJTextField.getText(), 1, "CPT2009", "chartingWindow");		} else if (e.getActionCommand().equals("cPTCodeQueryJTextField")) {			SystemWindow.println(e.getActionCommand());			fillCodeSetQueryReturnJPanels(cPTCodeQueryJTextField.getText(), 0, "CPT2009", "chartingWindow");		} else if (e.getActionCommand().equals("iCDContentsQueryJTextField")) {			SystemWindow.println(e.getActionCommand());			fillCodeSetQueryReturnJPanels(iCDContentsQueryJTextField.getText(), 1, "ICD10", "chartingWindow");		} else if (e.getActionCommand().equals("iCDCodeQueryJTextField")) {			SystemWindow.println(e.getActionCommand());			fillCodeSetQueryReturnJPanels(iCDCodeQueryJTextField.getText(), 0, "ICD10", "chartingWindow");		} else if (e.getActionCommand().equals("lOINCContentsQueryJTextField")) {			SystemWindow.println(e.getActionCommand());			fillCodeSetQueryReturnJPanels(lOINCContentsQueryJTextField.getText(), 1, "LOINC2.32", "chartingWindow");		} else if (e.getActionCommand().equals("lOINCCodeQueryJTextField")) {			SystemWindow.println(e.getActionCommand());			fillCodeSetQueryReturnJPanels(lOINCCodeQueryJTextField.getText(), 0, "LOINC2.32", "chartingWindow");		} else if (e.getActionCommand().equals("rXNormContentsQueryJTextField")) {			SystemWindow.println(e.getActionCommand());			fillCodeSetQueryReturnJPanels(rXNormContentsQueryJTextField.getText(), 1, "RXNCONSO09072010", "chartingWindow");		} else if (e.getActionCommand().equals("rXNormCodeQueryJTextField")) {			SystemWindow.println(e.getActionCommand());			fillCodeSetQueryReturnJPanels(rXNormCodeQueryJTextField.getText(), 0, "RXNCONSO09072010", "chartingWindow");		} else if (e.getActionCommand().equals("chartCoverTabJButton")) {			tabCardLayout.show(cardedChartContentJPanel, "chartCoverJScrollPane");			chartCoverTabJButton.setForeground(Color.BLACK);			demographicsTabJButton.setForeground(new Color(141, 120, 75));			activitiesTabJButton.setForeground(new Color(141, 120, 75));			historyTabJButton.setForeground(new Color(141, 120, 75));			insuranceTabJButton.setForeground(new Color(141, 120, 75));			chartCoverTabJButton.setIcon(coverOpenedImageIcon);			demographicsTabJButton.setIcon(demographicsClosedLeftOpenedImageIcon);			activitiesTabJButton.setIcon(ordersClosedImageIcon);			historyTabJButton.setIcon(historyClosedImageIcon);			insuranceTabJButton.setIcon(insuranceClosedImageIcon);			validate();			repaint();		} else if (e.getActionCommand().equals("demographicsTabJButton")) {			tabCardLayout.show(cardedChartContentJPanel, "demographicsJScrollPane");			chartCoverTabJButton.setForeground(new Color(141, 120, 75));			demographicsTabJButton.setForeground(Color.BLACK);			activitiesTabJButton.setForeground(new Color(141, 120, 75));			historyTabJButton.setForeground(new Color(141, 120, 75));			insuranceTabJButton.setForeground(new Color(141, 120, 75));			tabCardLayout.show(cardedChartContentJPanel, "demographicsJScrollPane");			chartCoverTabJButton.setIcon(coverClosedRightOpenedImageIcon);			demographicsTabJButton.setIcon(demographicsOpenedImageIcon);			activitiesTabJButton.setIcon(ordersClosedLeftOpenedImageIcon);			historyTabJButton.setIcon(historyClosedImageIcon);			insuranceTabJButton.setIcon(insuranceClosedImageIcon);			validate();			repaint();		} else if (e.getActionCommand().equals("historyTabJButton")) {			tabCardLayout.show(cardedChartContentJPanel, "historyJScrollPane");			chartCoverTabJButton.setForeground(new Color(141, 120, 75));			demographicsTabJButton.setForeground(new Color(141, 120, 75));			activitiesTabJButton.setForeground(new Color(141, 120, 75));			historyTabJButton.setForeground(Color.BLACK);			insuranceTabJButton.setForeground(new Color(141, 120, 75));			chartCoverTabJButton.setIcon(coverClosedRightClosedImageIcon);			demographicsTabJButton.setIcon(demographicsClosedImageIcon);			activitiesTabJButton.setIcon(ordersClosedRightOpenedImageIcon);			historyTabJButton.setIcon(historyOpenedImageIcon);			insuranceTabJButton.setIcon(insuranceClosedLeftOpenedImageIcon);			validate();			repaint();		} else if (e.getActionCommand().equals("insuranceTabJButton")) {			tabCardLayout.show(cardedChartContentJPanel, "insuranceJScrollPane");			chartCoverTabJButton.setForeground(new Color(141, 120, 75));			demographicsTabJButton.setForeground(new Color(141, 120, 75));			activitiesTabJButton.setForeground(new Color(141, 120, 75));			historyTabJButton.setForeground(new Color(141, 120, 75));			insuranceTabJButton.setForeground(Color.BLACK);			tabCardLayout.show(cardedChartContentJPanel, "insuranceJScrollPane");			chartCoverTabJButton.setIcon(coverClosedRightClosedImageIcon);			demographicsTabJButton.setIcon(demographicsClosedImageIcon);			activitiesTabJButton.setIcon(ordersClosedImageIcon);			historyTabJButton.setIcon(historyClosedRightOpenedImageIcon);			insuranceTabJButton.setIcon(insuranceOpenedImageIcon);			validate();			repaint();		} else if (e.getActionCommand().equals("printCoverYesJRadioButton")) {			if (printCoverYesJRadioButton.isSelected()) {				printCoverNoJRadioButton.setSelected(false);			}		} else if (e.getActionCommand().equals("printCoverNoJRadioButton")) {			if (printCoverNoJRadioButton.isSelected()) {				printCoverYesJRadioButton.setSelected(false);			}		} else if (e.getActionCommand().equals("NEWCHARTTEMPLATECHOICE")) {			newChartJPopupMenu.setVisible(false);			makeNewChart(Integer.parseInt(((JButton) (e.getSource())).getName()));		} else if (e.getActionCommand().equals("closeChartCancelJButton")) {			closingPromptJPopupMenu.setVisible(false);		} else if (e.getActionCommand().equals("closeChartJButton")) {			closeChartSignoffAndCloseJButton.setBorder(SystemWindow.buttonBorder);			closeChartSignoffAndCloseJButton.setBackground(SystemWindow.buttonColor);			closeChartWithoutSigningOffJButton.setBorder(SystemWindow.buttonBorder);			closeChartWithoutSigningOffJButton.setBackground(SystemWindow.buttonColor);			if (!needSignOff) {				closeChart();			} else {				closingPromptJPopupMenu.show(closeChartJButton, -100, closeChartJButton.getHeight());				validate();				repaint();			}		} else if (e.getActionCommand().equals("closeChartSignoffAndCloseJButton")) {			closingPromptJPopupMenu.setVisible(false);			signOffAndHighlightAndProcessDataCellItems();			saveChart();			String openChartIDTemp = openChartID;			closeChart();			addTalkbackText("Chart " + openChartIDTemp + " signed-off and closed.", null, true);			validate();			repaint();		} else if (e.getActionCommand().equals("closeChartWithoutSigningOffJButton")) {			closingPromptJPopupMenu.setVisible(false);			saveChart();			String openChartIDTemp = openChartID;			closeChart();			addTalkbackText("Chart " + openChartIDTemp + " closed without signing-off.", null, true);			validate();			repaint();		} else if (e.getActionCommand().equals("openChartViaChartIDJTextField")) {			String recentChartIDString = openChartViaChartIDJTextField.getText();			if (!(recentChartIDString = isDataTypeCorrect("openChartViaChartIDJTextField", recentChartIDString, "e.getActionCommand().equals(\"OPENCHARTVIACHARTID\")")).equals("false")) {				openChart(recentChartIDString);				openChartViaChartIDJTextField.setText("");				openChartViaChartIDJTextField.repaint();			} else {				addTalkbackText("Please enter a valid chart number format", null, true);			}			openChartJPopupMenu.setVisible(false);		} else if (e.getActionCommand().equals("openChartViaURLJTextField")) {			openChartJPopupMenu.setVisible(false);		} else if (e.getActionCommand().equals("resetPrintServicesJButton")) {			printJPopupMenu.removeAll();			GridBagConstraints printPopupMenuConstraints2 = new GridBagConstraints();			printService = PrinterJob.lookupPrintServices();			JLabel printPanelHeaderJLabel = new JLabel("Choose printer:");			printPanelHeaderJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(92, 92, 92, 128)));			printPopupMenuConstraints2.anchor = GridBagConstraints.WEST;			printJPopupMenu.add(printPanelHeaderJLabel, printPopupMenuConstraints2);			int ind = 1;			while (ind < PrinterJob.lookupPrintServices().length) {				printPopupMenuConstraints2.gridy = ind;				printJPopupMenu.add(new JButton(PrinterJob.lookupPrintServices()[ind].toString()));				((JButton) (printJPopupMenu.getComponent(ind))).setName(String.valueOf(ind));				ind++;			}		} else if (e.getActionCommand().equals("exportJButton")) {			if (!chartIsOpen) {				addTalkbackText("There is no open chart to export.", null, true);			} else {				exportPdfJButton.setBorder(SystemWindow.buttonBorder);				exportPdfJButton.setBackground(SystemWindow.buttonColor);				exportHtmlJButton.setBorder(SystemWindow.buttonBorder);				exportHtmlJButton.setBackground(SystemWindow.buttonColor);				exportHL7MessageJButton.setBorder(SystemWindow.buttonBorder);				exportHL7MessageJButton.setBackground(SystemWindow.buttonColor);				exportNowJButton.setBorder(SystemWindow.buttonBorder);				exportNowJButton.setBackground(SystemWindow.buttonColor);				exportJPopupMenu.show(exportJButton, -12, exportJButton.getHeight() + 3);			}		} else if (e.getActionCommand().equals("exportNowJButton")) {		} else if (e.getActionCommand().equals("printJButton")) {			if (!chartIsOpen) {				addTalkbackText("There is no open chart to print.", null, true);			} else {				printJPopupMenu.show(printJButton, -12, printJButton.getHeight() + 3);			}			printNowJButton.setBorder(SystemWindow.buttonBorder);			printNowJButton.setBackground(SystemWindow.buttonColor);		} else if (e.getActionCommand().equals("printNowJButton")) {			String sectionName = null;			JPanel sectionJPanel = null;			String printingTalkBackText = "nulled";			String sectionPageRangeEntry = null;			int coverPage;			Vector<JPanel> printPageJPanels = new Vector<JPanel>(20, 3);			Vector printPageJStrings = new Vector(20, 3);			int numPagesInSection = 0;			int sectionNumber = 0;			while (sectionNumber < 6) {				if (sectionNumber == 0) {					sectionName = "CHART_COVER";					if (printCoverYesJRadioButton.isSelected()) {						numPagesInSection = 1;						sectionPageRangeEntry = "1";					} else {						numPagesInSection = 0;						sectionPageRangeEntry = "0";					}				} else if (sectionNumber == 1) {					sectionName = "DEMOGRAPHICS";					sectionJPanel = demographicsJPanel;					numPagesInSection = sectionJPanel.getComponentCount() - 1;					sectionPageRangeEntry = printDemographicsJTextField.getText();				} else if (sectionNumber == 2) {					sectionName = "ACTIVITIES";					sectionJPanel = activitiesJPanel;					numPagesInSection = sectionJPanel.getComponentCount() - 1;					sectionPageRangeEntry = printordersJTextField.getText();				} else if (sectionNumber == 3) {					sectionName = "HISTORY";					sectionJPanel = historyJPanel;					numPagesInSection = sectionJPanel.getComponentCount() - 1;					sectionPageRangeEntry = printHistoryJTextField.getText();				} else if (sectionNumber == 4) {					sectionName = "INSURANCE";					sectionJPanel = insuranceJPanel;					numPagesInSection = sectionJPanel.getComponentCount() - 1;					sectionPageRangeEntry = printInsuranceJTextField.getText();				}				sectionPageRangeEntry.replaceAll(" ", "");				sectionPageRangeEntry.replaceAll("-", "to");				if (sectionPageRangeEntry.toLowerCase().equals("all")) {					int ind = 0;					while (ind < numPagesInSection) {						printPageJPanels.add((JPanel) (sectionJPanel.getComponent(ind)));						printPageJStrings.add(sectionName + " page " + String.valueOf(ind + 1));						ind++;					}				} else if (sectionPageRangeEntry.contains("to")) {					try {						int firstPage = Integer.parseInt(sectionPageRangeEntry.substring(0, sectionPageRangeEntry.indexOf("to")));						int endPage = Integer.parseInt(sectionPageRangeEntry.substring(sectionPageRangeEntry.indexOf("to") + 2));						int ind = firstPage - 1;						while (ind < endPage) {							printPageJPanels.add((JPanel) (sectionJPanel.getComponent(ind)));							printPageJStrings.add(sectionName + " page " + String.valueOf(ind + 1));							ind++;						}						printingTalkBackText = "TRUE";					} catch (NumberFormatException ex) {						printingTalkBackText = "Invalid " + sectionName + " page numbers";					}				} else {					if (sectionJPanel != null && Integer.parseInt(sectionPageRangeEntry) != 0) {						System.out.println("sectionJPanel: " + sectionJPanel);						System.out.println("sectionPageRangeEntry: " + sectionPageRangeEntry);						System.out.println("(JPanel)(sectionJPanel.getComponent(Integer.parseInt(sectionPageRangeEntry))): " + (JPanel) (sectionJPanel.getComponent(Integer.parseInt(sectionPageRangeEntry))));						try {							printPageJPanels.add((JPanel) (sectionJPanel.getComponent(Integer.parseInt(sectionPageRangeEntry))));							printPageJStrings.add(sectionName + " page " + String.valueOf(Integer.parseInt(sectionPageRangeEntry) + 1));							printingTalkBackText = "TRUE";						} catch (NumberFormatException ex) {							printingTalkBackText = "Invalid " + sectionName + " page number";						}					}				}				sectionNumber++;			}			int ind = 0;			while (ind < printPageJStrings.size()) {				ind++;			}			try {				screenShot = new Robot().createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));			} catch (AWTException ex) {			}			Device.device.io.printNow(openChartID, "CHART", printPageJPanels);		} else if (e.getActionCommand().equals("signOffJButton")) {			if (signOffAndHighlightAndProcessDataCellItems()) {				signOffJButton.setOpaque(false);				signOffJButton.setEnabled(false);				addTalkbackText("Everything signed-off", null, true);			}		}	}	private void summaryPapers(String string) {	}	private boolean signOffAndHighlightAndProcessDataCellItems() {		Vector dataCell;		Color highlightColor = null;		String dataCellProcessingState;		int chartSection;		int pageNumber;		int itemNumber;		int ind = 0;		try {			while (ind < itemsToSignAndProcess.size()) {				chartSection = (int) Integer.parseInt((itemsToSignAndProcess.elementAt(ind)[1]));				pageNumber = (int) Integer.parseInt((itemsToSignAndProcess.elementAt(ind)[2]));				itemNumber = (int) Integer.parseInt((itemsToSignAndProcess.elementAt(ind)[3]));				dataCell = ((Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(chartSection))).elementAt(pageNumber))).elementAt(itemNumber)));				highlightColor = null;				if (itemsToSignAndProcess.elementAt(ind)[0].equals("belay signing")) {					((Vector) (dataCell.elementAt(2))).setElementAt(itemsToSignAndProcess.elementAt(ind)[0], 0);					;					highlightColor = unsignedFieldVeryLightGrayColor;				} else {					if (null != (dataCellProcessingState = processItem(itemsToSignAndProcess.elementAt(ind))) && !dataCellProcessingState.startsWith("processed")) {						highlightColor = unprocessedFieldHighlightColor;					} else {						highlightColor = Color.WHITE;					}					((Vector) (dataCell.elementAt(2))).setElementAt(dataCellProcessingState, 0);				}				if (focusLostDataCellDisplayObjectWithExtraDataDatatype.endsWith("TS")) {					JPanel timeStampJPanel = ((JPanel) (((JPanel) (((JPanel) (((JPanel) (((JPanel) (((JViewport) (((JScrollPane) (cardedChartContentJPanel.getComponent(chartSection))).getViewport())).getComponent(0))).getComponent(pageNumber - 1))).getComponent(0))).getComponent(0))).getComponent(itemNumber)));					((JTextField) ((JPanel) (timeStampJPanel)).getComponent(1)).setBackground(highlightColor);					((JTextField) ((JPanel) (timeStampJPanel)).getComponent(3)).setBackground(highlightColor);					((JTextField) ((JPanel) (timeStampJPanel)).getComponent(4)).setBackground(highlightColor);					((JTextField) ((JPanel) (timeStampJPanel)).getComponent(6)).setBackground(highlightColor);					((JTextField) ((JPanel) (timeStampJPanel)).getComponent(8)).setBackground(highlightColor);					((JTextField) ((JPanel) (timeStampJPanel)).getComponent(10)).setBackground(highlightColor);					((JTextField) ((JPanel) (timeStampJPanel)).getComponent(11)).setBackground(highlightColor);				} else if (focusLostDataCellDisplayObjectWithExtraDataDatatype.equals("text")) {					((JTextArea) (((JPanel) (((JPanel) (((JPanel) (((JPanel) (((JPanel) (((JViewport) (((JScrollPane) (cardedChartContentJPanel.getComponent(chartSection))).getViewport())).getComponent(0))).getComponent(pageNumber - 1))).getComponent(0))).getComponent(0))).getComponent(itemNumber))).getComponent(1))).setBackground(highlightColor);				} else {				}				ind++;			}			itemsToSignAndProcess = new Vector<String[]>();			signOffJButton.setOpaque(false);			signOffJButton.setEnabled(false);			return true;		} catch (Exception e) {			e.printStackTrace();			return false;		}	}	private String processItem(String[] dataCellPreProcessingStateAndLoci) {		return null;	}	private boolean changeDataCellDisplayComponentBackToDesiredValue() {		if (focusLostDataCellDisplayObjectWithExtraDataDatatype.endsWith("TS")) {		} else if (focusLostDataCellDisplayObjectWithExtraDataDatatype.equals("text")) {			((JTextComponent) focusLostDataCellDisplayObjectWithExtraDataToAddComponent).setText((String) focusLostBeforeChangeObject);			focusLostDataCellDisplayObjectWithExtraDataDatatype = "text";		} else {		}		return true;	}	private String getPatientURL() {		return null;	}	public void enableLOINCOrderJPanel(boolean bool) {		if (bool) {			displayOrdersCardedBasePanelAddedJPanel.setOpaque(false);			displayOrdersCardedBasePanelAddedJPanel.remove(displayOrdersCardedBasePanelAddedJLabel);			observationAxisComponentContentJTextArea.setText("");			observationAxisPropertyContentJLabel.setText("");			observationAxisTimeAspectContentJLabel.setText("");			observationAxisSystemContentJLabel.setText("");			observationAxisScaletypeContentJLabel.setText("");			observationAxisMethodContentJLabel.setText("");			orderEntryCodeChoicesJPanel.removeAll();			orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel.removeAll();			displayOrdersCardLayout.show(displayOrdersCardedJPanel, "lOINCOrderJPanel");		}		displayOrdersCardedBasePanelAddedJPanel.setOpaque(false);		displayOrdersCardedBasePanelAddedJPanel.remove(displayOrdersCardedBasePanelAddedJLabel);		orderEntryCodeChoicesJPanel.removeAll();		orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel.removeAll();		displayOrdersCardLayout.show(displayOrdersCardedJPanel, "lOINCOrderJPanel");	}	private Vector<String> validateDiagnostic() {		Vector<String> diagnostic = new Vector<String>();		String diagnosticTextAreaString = diagnosticJTextArea.getText();		if ((null == diagnosticTextAreaString || diagnosticTextAreaString.equals(""))) {			diagnostic.add("Please enter an observation");		} else {			diagnostic.add("VALID");			diagnostic.add(diagnosticTextAreaString);		}		return diagnostic;	}	private Vector<String> validateProcedural() {		SystemWindow.println("Validating procedural");		Vector<String> procedural = new Vector<String>();		String proceduralTextAreaString = proceduralJTextArea.getText();		if ((null == proceduralTextAreaString || proceduralTextAreaString.equals(""))) {			procedural.add("Please enter an observation");		} else {			procedural.add("VALID");			procedural.add(proceduralTextAreaString);		}		return procedural;	}	private Vector<String> validateObservation() {		Vector<String> observation = new Vector<String>();		String observationAxisComponentContentTextAreaString = observationAxisComponentContentJTextArea.getText();		String observationAxisPropertyContentLabelString = observationAxisPropertyContentJLabel.getText();		String observationAxisTimeAspectContentLabelString = observationAxisTimeAspectContentJLabel.getText();		String observationAxisSystemContentLabelString = observationAxisSystemContentJLabel.getText();		String observationAxisScaletypeContentLabelString = observationAxisScaletypeContentJLabel.getText();		String observationAxisMethodContentLabelString = observationAxisMethodContentJLabel.getText();		if ((null == observationAxisComponentContentTextAreaString || observationAxisComponentContentTextAreaString.equals(""))) {			observation.add("Please enter an observation");		} else {			observation.add("VALID");			observation.add(observationAxisComponentContentTextAreaString);			observation.add(observationAxisPropertyContentLabelString);			observation.add(observationAxisTimeAspectContentLabelString);			observation.add(observationAxisSystemContentLabelString);			observation.add(observationAxisScaletypeContentLabelString);			observation.add(observationAxisMethodContentLabelString);		}		return observation;	}	public void enablePrescriptionOrder(boolean bool) {		if (bool) {			prescriptionOrderDrugJTextArea.setText("");			prescriptionOrderDispenseJTextField.setText("");			prescriptionOrderRefillsJTextField.setText("");			prescriptionOrderVoidDateJTextField.setText("");			prescriptionOrderAlertJTextField.setText("");			prescriptionOrderCommentJTextField.setText("");			prescriptionOrderDispenseAsWrittenYesJRadioButton.setSelected(false);			prescriptionOrderDispenseAsWrittenNoJRadioButton.setSelected(false);			prescriptionOrderPatientReportedYesJRadioButton.setSelected(false);			prescriptionOrderPatientReportedNoJRadioButton.setSelected(false);			prescriptionOrderPharmacyJTextField.setText("");			prescriptionOrderSignatureJTextField.setText("");			displayOrdersCardedBasePanelAddedJPanel.setOpaque(false);			displayOrdersCardedBasePanelAddedJPanel.remove(displayOrdersCardedBasePanelAddedJLabel);			orderEntryCodeChoicesJPanel.removeAll();			orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel.removeAll();			displayOrdersCardLayout.show(displayOrdersCardedJPanel, "prescriptionOrderJPanel");		} else {			prescriptionOrderDrugJTextArea.setEnabled(false);			prescriptionOrderDispenseJTextField.setEnabled(false);			prescriptionOrderRefillsJTextField.setEnabled(false);			prescriptionOrderVoidDateJTextField.setEnabled(false);			prescriptionOrderAlertJTextField.setEnabled(false);			prescriptionOrderCommentJTextField.setEnabled(false);			prescriptionOrderDispenseAsWrittenYesJRadioButton.setEnabled(false);			prescriptionOrderDispenseAsWrittenNoJRadioButton.setEnabled(false);			prescriptionOrderPatientReportedYesJRadioButton.setEnabled(false);			prescriptionOrderPatientReportedNoJRadioButton.setEnabled(false);			prescriptionOrderSignatureJTextField.setEnabled(false);			prescriptionOrderPharmacyJTextField.setEnabled(false);		}		validate();		repaint();	}	private Vector<String> validatePrescription() {		Vector<String> prescription = new Vector<String>();		String prescriptionOrderDrugTextAreaString = prescriptionOrderDrugJTextArea.getText();		String prescriptionOrderDispenseTextFieldString = prescriptionOrderDispenseJTextField.getText();		String prescriptionOrderSignatureTextFieldString = prescriptionOrderSignatureJTextField.getText();		String prescriptionOrderRefillsTextFieldString = prescriptionOrderRefillsJTextField.getText();		String prescriptionOrderVoidDateTextFieldString = prescriptionOrderVoidDateJTextField.getText();		String prescriptionOrderAlertTextFieldString = prescriptionOrderAlertJTextField.getText();		String prescriptionOrderCommentTextFieldString = prescriptionOrderCommentJTextField.getText();		String prescriptionOrderPharmacyTextFieldString = prescriptionOrderPharmacyJTextField.getText();		if ((null == prescriptionOrderDrugTextAreaString || prescriptionOrderDrugTextAreaString.equals(""))) {			prescription.add("Please enter an observation");		} else if ((null == prescriptionOrderDispenseTextFieldString || prescriptionOrderDispenseTextFieldString.equals(""))) {			prescription.add("Please enter \"dispense\" information");		} else if ((null == prescriptionOrderSignatureTextFieldString || prescriptionOrderSignatureTextFieldString.equals(""))) {			prescription.add("Please sign prescription");		} else if ((null == prescriptionOrderRefillsTextFieldString || prescriptionOrderRefillsTextFieldString.equals(""))) {			prescription.add("Please enter a refill number");		} else if (isInteger(prescriptionOrderRefillsTextFieldString)) {			prescription.add("Please enter a valid refill number");		} else if ((null == prescriptionOrderVoidDateTextFieldString || prescriptionOrderVoidDateTextFieldString.equals(""))) {			prescription.add("Please enter a void date");		} else if ((null == prescriptionOrderPharmacyTextFieldString || prescriptionOrderPharmacyTextFieldString.equals(""))) {			prescription.add("Please enter a pharmacy");		} else if (!prescriptionOrderDispenseAsWrittenYesJRadioButton.isSelected() & !prescriptionOrderDispenseAsWrittenNoJRadioButton.isSelected()) {			prescription.add("Please select a choice for, \"Dispense as written:\"");		} else if (!prescriptionOrderPatientReportedYesJRadioButton.isSelected() & !prescriptionOrderPatientReportedNoJRadioButton.isSelected()) {			prescription.add("Please select a choice for, \"Patient reported:\"");		} else {			prescription.add("VALID");			prescription.add(prescriptionOrderDrugTextAreaString);			prescription.add(prescriptionOrderDispenseTextFieldString);			prescription.add(prescriptionOrderSignatureTextFieldString);			prescription.add(prescriptionOrderRefillsTextFieldString);			prescription.add(prescriptionOrderVoidDateTextFieldString);			prescription.add(prescriptionOrderAlertTextFieldString);			prescription.add(prescriptionOrderCommentTextFieldString);			if (prescriptionOrderDispenseAsWrittenYesJRadioButton.isSelected()) {				prescription.add("Yes");			} else if (prescriptionOrderDispenseAsWrittenNoJRadioButton.isSelected()) {				prescription.add("No");			}			if (prescriptionOrderPatientReportedYesJRadioButton.isSelected()) {				prescription.add("Yes");			} else if (prescriptionOrderPatientReportedNoJRadioButton.isSelected()) {				prescription.add("No");			}			prescription.add(prescriptionOrderPharmacyTextFieldString);		}		return prescription;	}	public boolean isInteger(String possibleIntegerString) {		String[] integerChar = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };		String targetStringChar;		boolean notInteger = false;		int outerInd = 0;		int innerInd = 0;		while (outerInd < possibleIntegerString.length()) {			innerInd = 0;			targetStringChar = possibleIntegerString.substring(outerInd, outerInd);			while (innerInd < 10) {				if (!integerChar[innerInd].equals(targetStringChar)) {					notInteger = true;				}				innerInd++;			}			outerInd++;		}		return !notInteger;	}	public JPanel calendarJPopupMenu(String window, String chartLocation) {		JPanel appointmentsFormButtonsJPanel = new JPanel(new GridBagLayout());		JPanel dateJPanel = new JPanel(new GridBagLayout());		JPanel timeJPanel = new JPanel(new GridBagLayout());		JPanel appointmentsDayOfWeekButtonJPanel = new JPanel(new GridBagLayout());		JPanel appointmentsMonthButtonJPanel = new JPanel(new GridBagLayout());		JPanel appointmentsDayOfMonthButtonJPanel = new JPanel(new GridBagLayout());		JPanel appointmentsYearButtonJPanel = new JPanel(new GridBagLayout());		JPanel appointmentsHourButtonJPanel = new JPanel(new GridBagLayout());		JPanel appointmentsMinuteButtonJPanel = new JPanel(new GridBagLayout());		JPanel appointmentsAmPmButtonJPanel = new JPanel(new GridBagLayout());		JButton appointmentsIncreaseAppointmentDayOfWeekJButton = new JButton("Day of week");		JButton appointmentsDecreaseAppointmentDayOfWeekJButton = new JButton("Day of week");		JButton appointmentsIncreaseAppointmentMonthJButton = new JButton("Month");		JButton appointmentsDecreaseAppointmentMonthJButton = new JButton("Month");		JButton appointmentsIncreaseAppointmentDayOfMonthJButton = new JButton("Day of month");		JButton appointmentsDecreaseAppointmentDayOfMonthJButton = new JButton("Day of month");		JButton appointmentsIncreaseAppointmentHourJButton = new JButton("Hour");		JButton appointmentsDecreaseAppointmentHourJButton = new JButton("Hour");		JButton appointmentsIncreaseAppointmentMinuteJButton = new JButton("Minute");		JButton appointmentsDecreaseAppointmentMinuteJButton = new JButton("Minute");		JButton appointmentsIncreaseAppointmentAmPmJButton = new JButton("AM/PM");		JButton appointmentsDecreaseAppointmentAmPmJButton = new JButton("AM/PM");		JButton appointmentsIncreaseAppointmentYearJButton = new JButton("Year");		JButton appointmentsDecreaseAppointmentYearJButton = new JButton("Year");		GridBagConstraints appointmentsFormButtonsPanelConstraints = new GridBagConstraints();		GridBagConstraints datePanelConstraints = new GridBagConstraints();		GridBagConstraints timePanelConstraints = new GridBagConstraints();		GridBagConstraints appointmentsDayOfWeekPanelConstraints = new GridBagConstraints();		GridBagConstraints appointmentsMonthButtonPanelConstraints = new GridBagConstraints();		GridBagConstraints appointmentsDayOfMonthPanelConstraints = new GridBagConstraints();		GridBagConstraints appointmentsHourPanelConstraints = new GridBagConstraints();		GridBagConstraints appointmentsMinutePanelConstraints = new GridBagConstraints();		GridBagConstraints appointmentsAmPmPanelConstraints = new GridBagConstraints();		GridBagConstraints appointmentsYearPanelConstraints = new GridBagConstraints();		if (window.equals("chartingWindow")) {			appointmentsIncreaseAppointmentDayOfWeekJButton.addActionListener(Device.device.workspace.chartingWindow);			appointmentsIncreaseAppointmentMonthJButton.addActionListener(Device.device.workspace.chartingWindow);			appointmentsIncreaseAppointmentDayOfMonthJButton.addActionListener(Device.device.workspace.chartingWindow);			appointmentsIncreaseAppointmentYearJButton.addActionListener(Device.device.workspace.chartingWindow);			appointmentsIncreaseAppointmentHourJButton.addActionListener(Device.device.workspace.chartingWindow);			appointmentsIncreaseAppointmentMinuteJButton.addActionListener(Device.device.workspace.chartingWindow);			appointmentsIncreaseAppointmentAmPmJButton.addActionListener(Device.device.workspace.chartingWindow);		}		appointmentsIncreaseAppointmentDayOfWeekJButton.setActionCommand("calendarRollIncreaseDayOfWeekJButton");		appointmentsIncreaseAppointmentDayOfWeekJButton.setName("dayOfWeekJButton|" + chartLocation);		appointmentsDecreaseAppointmentDayOfWeekJButton.setActionCommand("calendarRollDecreaseDayOfWeekJButton");		appointmentsDecreaseAppointmentDayOfWeekJButton.setName("dayOfWeekJButton|" + chartLocation);		appointmentsIncreaseAppointmentMonthJButton.addActionListener(this);		appointmentsIncreaseAppointmentMonthJButton.setActionCommand("calendarRollIncreaseMonthJButton");		appointmentsIncreaseAppointmentMonthJButton.setName("monthJButton|" + chartLocation);		appointmentsDecreaseAppointmentMonthJButton.addActionListener(this);		appointmentsDecreaseAppointmentMonthJButton.setActionCommand("calendarDecreaseMonthJButton");		appointmentsDecreaseAppointmentMonthJButton.setName("monthJButton|" + chartLocation);		appointmentsIncreaseAppointmentDayOfMonthJButton.addActionListener(this);		appointmentsIncreaseAppointmentDayOfMonthJButton.setActionCommand("calendarRollDecreaseDayOfMonthJButton");		appointmentsIncreaseAppointmentDayOfMonthJButton.setName("dayOfMonthJButton|" + chartLocation);		appointmentsDecreaseAppointmentDayOfMonthJButton.addActionListener(this);		appointmentsDecreaseAppointmentDayOfMonthJButton.setActionCommand("calendarRollDecreaseDayOfMonthJButton");		appointmentsDecreaseAppointmentDayOfMonthJButton.setName("dayOfMonthJButton|" + chartLocation);		appointmentsIncreaseAppointmentYearJButton.addActionListener(this);		appointmentsIncreaseAppointmentYearJButton.setActionCommand("calendarRollIncreaseYearJButton");		appointmentsIncreaseAppointmentYearJButton.setName("yearJButton|" + chartLocation);		appointmentsDecreaseAppointmentYearJButton.addActionListener(this);		appointmentsDecreaseAppointmentYearJButton.setActionCommand("calendarRollDecreaseYearJButton");		appointmentsDecreaseAppointmentYearJButton.setName("yearJButton|" + chartLocation);		appointmentsIncreaseAppointmentHourJButton.addActionListener(this);		appointmentsIncreaseAppointmentHourJButton.setActionCommand("calendarRollIncreaseHourJButton");		appointmentsIncreaseAppointmentHourJButton.setName("hourJButton|" + chartLocation);		appointmentsDecreaseAppointmentHourJButton.addActionListener(this);		appointmentsDecreaseAppointmentHourJButton.setActionCommand("calendarRollDecreaseHourJButton");		appointmentsDecreaseAppointmentHourJButton.setName("hourJButton|" + chartLocation);		appointmentsIncreaseAppointmentMinuteJButton.addActionListener(this);		appointmentsIncreaseAppointmentMinuteJButton.setActionCommand("calendarRollIncreaseMinuteJButton");		appointmentsIncreaseAppointmentMinuteJButton.setName("minuteJButton|" + chartLocation);		appointmentsDecreaseAppointmentMinuteJButton.addActionListener(this);		appointmentsDecreaseAppointmentMinuteJButton.setActionCommand("calendarRollDecreaseMinuteJButton");		appointmentsDecreaseAppointmentMinuteJButton.setName("minuteJButton|" + chartLocation);		appointmentsIncreaseAppointmentAmPmJButton.addActionListener(this);		appointmentsIncreaseAppointmentAmPmJButton.setActionCommand("appointmentsIncreaseAppointmentAmPmJButton");		appointmentsIncreaseAppointmentAmPmJButton.setName("amPmJButton|" + chartLocation);		appointmentsDecreaseAppointmentAmPmJButton.addActionListener(this);		appointmentsDecreaseAppointmentAmPmJButton.setActionCommand("appointmentsDecreaseAppointmentAmPmJButton");		appointmentsDecreaseAppointmentAmPmJButton.setName("amPmJButton|" + chartLocation);		dateJPanel.setOpaque(false);		datePanelConstraints.gridx = 0;		dateJPanel.add(appointmentsDayOfWeekButtonJPanel, datePanelConstraints);		datePanelConstraints.gridx = 1;		dateJPanel.add(appointmentsDayOfWeekButtonJPanel, datePanelConstraints);		datePanelConstraints.gridx = 2;		dateJPanel.add(appointmentsMonthButtonJPanel, datePanelConstraints);		datePanelConstraints.gridx = 3;		dateJPanel.add(appointmentsDayOfMonthButtonJPanel, datePanelConstraints);		datePanelConstraints.gridx = 4;		dateJPanel.add(appointmentsYearButtonJPanel, datePanelConstraints);		timeJPanel.setOpaque(false);		timePanelConstraints.gridx = 0;		timeJPanel.add(appointmentsHourButtonJPanel, timePanelConstraints);		timePanelConstraints.gridx = 1;		timeJPanel.add(appointmentsMinuteButtonJPanel, timePanelConstraints);		timePanelConstraints.gridx = 2;		timeJPanel.add(appointmentsAmPmButtonJPanel, timePanelConstraints);		appointmentsFormButtonsJPanel.setOpaque(false);		appointmentsFormButtonsJPanel.setBackground(SystemWindow.quintessentialThemeColor);		appointmentsFormButtonsPanelConstraints.gridy = 0;		appointmentsFormButtonsPanelConstraints.gridx = 0;		appointmentsFormButtonsPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsFormButtonsPanelConstraints.weightx = 1;		appointmentsFormButtonsPanelConstraints.gridx = 1;		appointmentsFormButtonsJPanel.add(dateJPanel, appointmentsFormButtonsPanelConstraints);		appointmentsFormButtonsPanelConstraints.gridx = 2;		appointmentsFormButtonsJPanel.add(timeJPanel, appointmentsFormButtonsPanelConstraints);		appointmentsDayOfWeekButtonJPanel.setOpaque(false);		appointmentsDayOfWeekPanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsDayOfWeekPanelConstraints.weightx = 1;		appointmentsDayOfWeekPanelConstraints.insets = new Insets(0, 3, 2, 3);		appointmentsDayOfWeekButtonJPanel.add(appointmentsIncreaseAppointmentDayOfWeekJButton, appointmentsDayOfWeekPanelConstraints);		appointmentsDayOfWeekPanelConstraints.gridy = 1;		appointmentsDayOfWeekPanelConstraints.insets = new Insets(2, 3, 0, 3);		appointmentsDayOfWeekButtonJPanel.add(appointmentsDecreaseAppointmentDayOfWeekJButton, appointmentsDayOfWeekPanelConstraints);		appointmentsMonthButtonJPanel.setOpaque(false);		appointmentsMonthButtonPanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsMonthButtonPanelConstraints.weightx = 1;		appointmentsMonthButtonPanelConstraints.insets = new Insets(0, 3, 2, 3);		appointmentsMonthButtonJPanel.add(appointmentsIncreaseAppointmentMonthJButton, appointmentsMonthButtonPanelConstraints);		appointmentsMonthButtonPanelConstraints.gridy = 1;		appointmentsMonthButtonPanelConstraints.insets = new Insets(2, 3, 0, 3);		appointmentsMonthButtonJPanel.add(appointmentsDecreaseAppointmentMonthJButton, appointmentsMonthButtonPanelConstraints);		appointmentsDayOfMonthButtonJPanel.setOpaque(false);		appointmentsDayOfMonthPanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsDayOfMonthPanelConstraints.weightx = 1;		appointmentsDayOfMonthPanelConstraints.insets = new Insets(0, 3, 2, 3);		appointmentsDayOfMonthButtonJPanel.add(appointmentsIncreaseAppointmentDayOfMonthJButton, appointmentsDayOfMonthPanelConstraints);		appointmentsDayOfMonthPanelConstraints.gridy = 1;		appointmentsDayOfMonthPanelConstraints.insets = new Insets(2, 3, 0, 3);		appointmentsDayOfMonthButtonJPanel.add(appointmentsDecreaseAppointmentDayOfMonthJButton, appointmentsDayOfMonthPanelConstraints);		appointmentsYearButtonJPanel.setOpaque(false);		appointmentsYearPanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsYearPanelConstraints.weightx = 1;		appointmentsYearPanelConstraints.insets = new Insets(0, 3, 2, 3);		appointmentsYearButtonJPanel.add(appointmentsIncreaseAppointmentYearJButton, appointmentsYearPanelConstraints);		appointmentsYearPanelConstraints.gridy = 1;		appointmentsYearPanelConstraints.insets = new Insets(2, 3, 0, 3);		appointmentsYearButtonJPanel.add(appointmentsDecreaseAppointmentYearJButton, appointmentsYearPanelConstraints);		appointmentsHourButtonJPanel.setOpaque(false);		appointmentsHourPanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsHourPanelConstraints.weightx = 1;		appointmentsHourPanelConstraints.insets = new Insets(0, 3, 2, 3);		appointmentsHourButtonJPanel.add(appointmentsIncreaseAppointmentHourJButton, appointmentsHourPanelConstraints);		appointmentsHourPanelConstraints.gridy = 1;		appointmentsHourPanelConstraints.insets = new Insets(2, 3, 0, 3);		appointmentsHourButtonJPanel.add(appointmentsDecreaseAppointmentHourJButton, appointmentsHourPanelConstraints);		appointmentsMinuteButtonJPanel.setOpaque(false);		appointmentsMinutePanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsMinutePanelConstraints.weightx = 1;		appointmentsMinutePanelConstraints.insets = new Insets(0, 0, 2, 3);		appointmentsMinuteButtonJPanel.add(appointmentsIncreaseAppointmentMinuteJButton, appointmentsMinutePanelConstraints);		appointmentsMinutePanelConstraints.gridy = 1;		appointmentsMinutePanelConstraints.insets = new Insets(2, 0, 0, 3);		appointmentsMinuteButtonJPanel.add(appointmentsDecreaseAppointmentMinuteJButton, appointmentsMinutePanelConstraints);		appointmentsAmPmButtonJPanel.setOpaque(false);		appointmentsAmPmPanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsAmPmPanelConstraints.weightx = 1;		appointmentsAmPmPanelConstraints.insets = new Insets(0, 0, 2, 3);		appointmentsAmPmButtonJPanel.add(appointmentsIncreaseAppointmentAmPmJButton, appointmentsAmPmPanelConstraints);		appointmentsAmPmPanelConstraints.gridy = 1;		appointmentsAmPmPanelConstraints.insets = new Insets(2, 0, 0, 3);		appointmentsAmPmButtonJPanel.add(appointmentsDecreaseAppointmentAmPmJButton, appointmentsAmPmPanelConstraints);		return appointmentsFormButtonsJPanel;	}	public void processOrder(Vector<String> order) {		String inputType = order.elementAt(0);		Vector itemAttributes = new Vector();		itemAttributes.add(0, inputType);		itemAttributes.add(1, "text");		itemAttributes.add(2, medicalCodeDatatype);		itemAttributes.add(3, false);		itemAttributes.add(4, "left to right");		itemAttributes.add(5, activityOrderFontType);		itemAttributes.add(6, activityOrderFontSize);		itemAttributes.add(7, true);		itemAttributes.add(8, 0);		itemAttributes.add(9, 0);		itemAttributes.add(10, 0);		itemAttributes.add(11, 0);		itemAttributes.add(12, 0);		itemAttributes.add(13, "orderItem");		itemAttributes.add(14, new Rectangle(0, 0, 0, 0));		Vector dataCell = new Vector();		dataCell.add(order);		dataCell.add(itemAttributes);		dataCell.add(new Vector(2, 1));		dataCell.add(createEventInformation("activity item"));		dataCell.add(new Vector());		if (((Vector) ((Vector) ((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(2))).size() == 1) {			newActivitiesOrHistoryPage("Activities");		}		((Vector) ((Vector) ((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(2)).lastElement()).add(dataCell.clone());		int pageNumber = ((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(2))).size() - 1;		int itemNumber = ((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(2))).elementAt(pageNumber))).size() - 1;		JPanel newActivityOrderJPanel = createDataCellItemJPanel(2, pageNumber, itemNumber);		int itemCountOnLastPage = ((JPanel) (((JPanel) (activitiesJPanel.getComponent(activitiesJPanel.getComponentCount() - 2))).getComponent(0))).getComponentCount();		int newActivityOrderPanelBoundsY = ((JPanel) (((JPanel) (((JPanel) (activitiesJPanel.getComponent(activitiesJPanel.getComponentCount() - 2))).getComponent(0))).getComponent(itemCountOnLastPage - 1))).getBounds().y + ((JPanel) (((JPanel) (((JPanel) (activitiesJPanel.getComponent(activitiesJPanel.getComponentCount() - 2))).getComponent(0))).getComponent(itemCountOnLastPage - 1))).getBounds().height + 10;		chartCoverJPanel.add(newActivityOrderJPanel);		validate();		repaint();		newActivityOrderJPanel.setBounds(0, newActivityOrderPanelBoundsY, SystemWindow.templatePageDimension.width, newActivityOrderJPanel.getHeight());		((Vector) (((Vector) (((Vector) (((Vector) ((Vector) ((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(2)).lastElement()).lastElement())).elementAt(1))))).setElementAt(new Rectangle(0, newActivityOrderPanelBoundsY, SystemWindow.templatePageDimension.width, newActivityOrderJPanel.getHeight()), 14);		chartCoverJPanel.remove(newActivityOrderJPanel);		if (newActivityOrderPanelBoundsY + newActivityOrderJPanel.getBounds().height > SystemWindow.templatePageDimension.height) {			SystemWindow.println("X1 item does not fit on the page");			((Vector) ((Vector) ((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(2)).lastElement()).remove(((Vector) ((Vector) ((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(2)).lastElement()).size() - 1);			newActivitiesOrHistoryPage("Activities");			itemCountOnLastPage = 1;			((Vector) ((Vector) ((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(2)).lastElement()).add(dataCell.clone());			newActivityOrderPanelBoundsY = ((JPanel) (((JPanel) (((JPanel) (activitiesJPanel.getComponent(activitiesJPanel.getComponentCount() - 2))).getComponent(0))).getComponent(itemCountOnLastPage - 1))).getBounds().y + ((JPanel) (((JPanel) (((JPanel) (activitiesJPanel.getComponent(activitiesJPanel.getComponentCount() - 2))).getComponent(0))).getComponent(itemCountOnLastPage - 1))).getBounds().height + 10;			((Vector) (((Vector) (((Vector) (((Vector) ((Vector) ((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(2)).lastElement()).lastElement())).elementAt(1))))).setElementAt(new Rectangle(0, newActivityOrderPanelBoundsY, SystemWindow.templatePageDimension.width, newActivityOrderJPanel.getHeight()), 14);			newActivityOrderJPanel.setBounds(0, newActivityOrderPanelBoundsY, SystemWindow.templatePageDimension.width, newActivityOrderJPanel.getHeight());			System.out.println("newActivityOrderJPanel.getBounds().x = 0?: " + newActivityOrderJPanel.getBounds().x);			System.out.println("newActivityOrderJPanel.getBounds().y = " + newActivityOrderPanelBoundsY + "?: " + newActivityOrderJPanel.getBounds().y);		} else {			SystemWindow.println("St 1 item does fit on the page");		}		SystemWindow.println(" Adding to page: " + (activitiesJPanel.getComponentCount() - 2));		SystemWindow.println(" X1 adding itemNumber: " + ((JPanel) (((JPanel) (activitiesJPanel.getComponent(activitiesJPanel.getComponentCount() - 2))).getComponent(0))).getComponentCount());		SystemWindow.println(" X1 adding newActivityOrderJPanel.getBounds(): " + newActivityOrderJPanel.getBounds());		((JPanel) (((JPanel) (activitiesJPanel.getComponent(activitiesJPanel.getComponentCount() - 2))).getComponent(0))).add(newActivityOrderJPanel);		medicalOutputFile.add(((Vector) ((Vector) ((Vector) ((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(2)).lastElement()).lastElement()));		displayOrdersCardedBasePanelAddedJPanel.setOpaque(true);		displayOrdersCardedBasePanelAddedJPanel.add(displayOrdersCardedBasePanelAddedJLabel);		validate();		repaint();	}	public void enableProceduralOrderJPanel(boolean bool) {		if (bool) {			proceduralJTextArea.setText("");		}		displayOrdersCardedBasePanelAddedJPanel.setOpaque(false);		displayOrdersCardedBasePanelAddedJPanel.remove(displayOrdersCardedBasePanelAddedJLabel);		orderEntryCodeChoicesJPanel.removeAll();		orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel.removeAll();		displayOrdersCardLayout.show(displayOrdersCardedJPanel, "proceduralOrderJPanel");	}	public void enableDiagnosticOrderJPanel(boolean bool) {		if (bool) {			diagnosticJTextArea.setText("");		}		displayOrdersCardedBasePanelAddedJPanel.setOpaque(false);		displayOrdersCardedBasePanelAddedJPanel.remove(displayOrdersCardedBasePanelAddedJLabel);		orderEntryCodeChoicesJPanel.removeAll();		orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel.removeAll();		displayOrdersCardLayout.show(displayOrdersCardedJPanel, "diagnosticOrderJPanel");	}	private void fillChartTabsPanel() {		if (this.isVisible()) {			chartShortcutTabsPanelJScrollPane.setSize(new Dimension(userTabImageIcon.getIconWidth(), (this.getY() + getHeight() - chartShortcutTabsJButton.getLocationOnScreen().y)));		}		chartShortcutTabsInnerJPanel.removeAll();		GridBagConstraints chartShortcutTabsInnerPanelConstraints = new GridBagConstraints();		Color tabColor = new Color(227, 227, 255);		chartShortcutTabsInnerPanelConstraints.gridy = 0;		int chartTabLocationSize = ((Vector) (((Vector) ((((Vector) Access.patientDataStruct.elementAt(1))).elementAt(0))).elementAt(17))).size();		int ind = 0;		GridBagConstraints chartShortcutTabEntryJPanelConstraints = new GridBagConstraints();		chartShortcutTabsInnerPanelConstraints.gridy = 1;		while (ind < chartTabLocationSize) {			JLabel newShortcutTabNameJLabel = new JLabel();			JLabel newShortcutTabChartSectionJLabel = new JLabel();			JLabel newShortcutTabPageAndItemNumberJLabel = new JLabel();			JPanel newShortcutTabButtonJPanel = new JPanel(new GridBagLayout());			String[] chartTabLocation = (String[]) (((Vector) (((Vector) ((((Vector) Access.patientDataStruct.elementAt(1))).elementAt(0))).elementAt(17))).elementAt(ind));			newShortcutTabButtonJPanel.setBorder(new BevelBorder(BevelBorder.RAISED));			newShortcutTabChartSectionJLabel = new JLabel(chartTabLocation[0]);			newShortcutTabNameJLabel = new JLabel(chartTabLocation[3]);			newShortcutTabPageAndItemNumberJLabel = new JLabel("Page " + chartTabLocation[1] + ", item " + chartTabLocation[2]);			JPanel newShortcutTabButtonPanelBorderJPanel1 = new JPanel(new GridBagLayout());			JPanel newShortcutTabButtonPanelBorderJPanel2 = new JPanel(new GridBagLayout());			newShortcutTabButtonPanelBorderJPanel1.setBackground(new Color(255, 255, 255));			newShortcutTabButtonPanelBorderJPanel2.setBackground(new Color(255, 255, 255));			newShortcutTabButtonPanelBorderJPanel1.setBackground(new Color(255, 255, 255));			newShortcutTabButtonPanelBorderJPanel1.setOpaque(true);			newShortcutTabButtonPanelBorderJPanel2.setOpaque(true);			SystemWindow.println("ind: " + ind);			SystemWindow.println("chartShortcutTabsJButton");			SystemWindow.println("chartTabLocation[0]: " + chartTabLocation[0]);			SystemWindow.println("chartTabLocation[1]: " + chartTabLocation[1]);			SystemWindow.println("chartTabLocation[2]: " + chartTabLocation[2]);			SystemWindow.println("chartTabLocation[3]: " + chartTabLocation[3]);			newShortcutTabNameJLabel.setBackground(new Color(255, 255, 255));			newShortcutTabNameJLabel.setOpaque(true);			chartShortcutTabEntryJPanelConstraints.weightx = 1;			chartShortcutTabEntryJPanelConstraints.gridy = 0;			chartShortcutTabEntryJPanelConstraints.gridwidth = 3;			newShortcutTabButtonJPanel.add(newShortcutTabChartSectionJLabel, chartShortcutTabEntryJPanelConstraints);			chartShortcutTabEntryJPanelConstraints.gridy = 1;			chartShortcutTabEntryJPanelConstraints.gridwidth = 1;			chartShortcutTabEntryJPanelConstraints.fill = GridBagConstraints.BOTH;			newShortcutTabButtonJPanel.add(newShortcutTabButtonPanelBorderJPanel1, chartShortcutTabEntryJPanelConstraints);			chartShortcutTabEntryJPanelConstraints.gridx = 1;			chartShortcutTabEntryJPanelConstraints.weightx = 0;			chartShortcutTabEntryJPanelConstraints.fill = GridBagConstraints.NONE;			newShortcutTabButtonJPanel.add(newShortcutTabNameJLabel, chartShortcutTabEntryJPanelConstraints);			chartShortcutTabEntryJPanelConstraints.gridx = 2;			chartShortcutTabEntryJPanelConstraints.weightx = 1;			chartShortcutTabEntryJPanelConstraints.fill = GridBagConstraints.BOTH;			newShortcutTabButtonJPanel.add(newShortcutTabButtonPanelBorderJPanel2, chartShortcutTabEntryJPanelConstraints);			chartShortcutTabEntryJPanelConstraints.gridwidth = 3;			chartShortcutTabEntryJPanelConstraints.gridx = 0;			chartShortcutTabEntryJPanelConstraints.gridy = 2;			chartShortcutTabEntryJPanelConstraints.fill = GridBagConstraints.NONE;			newShortcutTabButtonJPanel.add(newShortcutTabPageAndItemNumberJLabel, chartShortcutTabEntryJPanelConstraints);			newShortcutTabButtonJPanel.setBackground(tabColor);			newShortcutTabButtonJPanel.addMouseListener(this);			newShortcutTabButtonJPanel.setName("newShortcutTabButtonJPanel|" + chartTabLocation[0] + "|" + chartTabLocation[1] + "|" + chartTabLocation[2]);			chartShortcutTabsInnerPanelConstraints.gridy = chartShortcutTabsInnerPanelConstraints.gridy + 1;			chartShortcutTabsInnerJPanel.add(newShortcutTabButtonJPanel, chartShortcutTabsInnerPanelConstraints);			ind++;		}		validate();		repaint();		shortcutTabJPopupMenu.show(chartShortcutTabsJButton, 0, chartShortcutTabsJButton.getHeight());	}	public void newActivitiesOrHistoryPage(String chartSection) {		int sectionNumber;		JPanel pagePusherJPanel = new JPanel(new GridBagLayout());		GridBagConstraints newPageChartConstraints = new GridBagConstraints();		GridBagConstraints marginedPaperJPanelConstraints = new GridBagConstraints();		marginedPaperJPanelConstraints.insets = new Insets(10, 22, 22, 22);		if (chartSection.equals("Activities")) {			sectionNumber = 2;		} else {			sectionNumber = 3;		}		((Vector) ((((Vector) Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).add(new Vector(31, 1));		int newPageNumber = ((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).size() - 1;		String pageHeaderString = "City Health Clinic ";		String pageHeaderSpacerString = " ";		String pageHeaderSectionAndPageString = chartSection + " page " + newPageNumber + ".";		SystemWindow.println(" pageHeaderSectionAndPageString: " + pageHeaderSectionAndPageString);		JPanel pageHeaderJPanel = new JPanel(new GridBagLayout());		GridBagConstraints pageHeaderPanelConstraints = new GridBagConstraints();		JLabel pageHeaderJLabel = new JLabel(pageHeaderString);		JLabel pageHeaderSpacerJLabel = new JLabel(pageHeaderSpacerString);		JLabel pageHeaderSectionAndPageJLabel = new JLabel(pageHeaderSectionAndPageString);		pageHeaderJLabel.setFont(new Font("Serif", Font.BOLD, 14));		pageHeaderJPanel.setBorder(new MatteBorder(5, 0, 30, 0, Color.WHITE));		pageHeaderJPanel.setBackground(Color.WHITE);		pageHeaderSpacerJLabel.setFont(new Font("Serif", Font.BOLD, 14));		pageHeaderSectionAndPageJLabel.setFont(new Font("Serif", Font.BOLD, 14));		pageHeaderJPanel.add(pageHeaderJLabel, pageHeaderPanelConstraints);		pageHeaderPanelConstraints.weightx = 1;		pageHeaderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		pageHeaderJPanel.add(pageHeaderSpacerJLabel, pageHeaderPanelConstraints);		pageHeaderPanelConstraints.weightx = 0;		pageHeaderPanelConstraints.fill = GridBagConstraints.NONE;		pageHeaderJPanel.add(pageHeaderSectionAndPageJLabel, pageHeaderPanelConstraints);		chartCoverJPanel.add(pageHeaderJPanel);		validate();		repaint();		int pageHeaderPanelHeight = pageHeaderJPanel.getHeight();		chartCoverJPanel.remove(pageHeaderJPanel);		validate();		repaint();		pageHeaderJPanel.setBounds(0, 0, SystemWindow.templatePageDimension.width, pageHeaderPanelHeight);		Vector headerDataCell = new Vector(10, 1);		Vector headerItemAttributes = new Vector(10, 1);		headerItemAttributes.add(0, pageHeaderString);		headerItemAttributes.add(1, "header");		headerItemAttributes.add(2, "unencoded");		headerItemAttributes.add(3, false);		headerItemAttributes.add(4, null);		headerItemAttributes.add(5, activityOrderFontType);		headerItemAttributes.add(6, activityOrderFontSize);		headerItemAttributes.add(7, false);		headerItemAttributes.add(8, 12);		headerItemAttributes.add(9, 0);		headerItemAttributes.add(10, 0);		headerItemAttributes.add(11, 0);		headerItemAttributes.add(12, 0);		headerItemAttributes.add(13, "header");		headerItemAttributes.add(14, new Rectangle(pageHeaderJPanel.getBounds().x, pageHeaderJPanel.getBounds().y, pageHeaderJPanel.getBounds().width, pageHeaderJPanel.getBounds().height));		headerDataCell.add(0, null);		headerDataCell.add(1, headerItemAttributes.clone());		headerDataCell.add(2, null);		headerDataCell.add(3, new Vector());		((Vector) ((Vector) ((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber)).lastElement()).add(headerDataCell);		int c = newPageNumber;		while (c > 1) {			c = c - 2;		}		if (c == 1) {			newPageChartConstraints.gridy = (newPageNumber + 1) / 2 - 1;			newPageChartConstraints.gridx = 0;			if (newPageNumber == 1) {				newPageChartConstraints.insets = new Insets(12, 12, 6, 0);			} else {				newPageChartConstraints.insets = new Insets(6, 12, 6, 0);			}		} else {			newPageChartConstraints.gridy = newPageNumber / 2 - 1;			newPageChartConstraints.gridx = 2;			newPageChartConstraints.insets = new Insets(12, 0, 6, 12);		}		if (chartSection.equals("Activities")) {			activitiesJPanel.remove(activitiesJPanel.getComponentCount() - 1);			JPanel marginedPaperJPanel = new JPanel(new GridBagLayout());			marginedPaperJPanel.setBackground(Color.WHITE);			marginedPaperJPanel.add((JComponent) getTemplatePage(2, newPageNumber)[0], marginedPaperJPanelConstraints);			((JPanel) (marginedPaperJPanel.getComponent(0))).add(pageHeaderJPanel);			SystemWindow.println("Adding a new Activities page");			activitiesJPanel.add(marginedPaperJPanel, newPageChartConstraints);			newPageChartConstraints.gridheight = newPageChartConstraints.gridy + 1;			newPageChartConstraints.gridy = 0;			newPageChartConstraints.gridx = 1;			newPageChartConstraints.weighty = 1;			newPageChartConstraints.fill = GridBagConstraints.BOTH;			newPageChartConstraints.insets = new Insets(0, 0, 0, 0);			activitiesJPanel.add(middleCleft(), newPageChartConstraints);		} else {			historyJPanel.remove(historyJPanel.getComponentCount() - 1);			JPanel marginedPaperJPanel = new JPanel(new GridBagLayout());			marginedPaperJPanel.setBackground(Color.WHITE);			marginedPaperJPanel.add((JComponent) getTemplatePage(3, newPageNumber)[0], marginedPaperJPanelConstraints);			((JPanel) (marginedPaperJPanel.getComponent(0))).add(pageHeaderJPanel);			historyJPanel.add(marginedPaperJPanel, newPageChartConstraints);			newPageChartConstraints.gridheight = newPageChartConstraints.gridy + 1;			newPageChartConstraints.gridy = 0;			newPageChartConstraints.gridx = 1;			newPageChartConstraints.weighty = 1;			newPageChartConstraints.fill = GridBagConstraints.BOTH;			newPageChartConstraints.insets = new Insets(0, 0, 0, 0);			historyJPanel.add(middleCleft(), newPageChartConstraints);		}		addTalkbackText("New " + chartSection + " page created.", null, true);		validate();		repaint();	}	private String isDataTypeCorrect(String objectName, Object input, String caller) {		String answer = ((String) input);		String numbers = "0123456789";		if (objectName.equals("openChartViaChartIDJTextField")) {			if (answer == null || answer.equals("")) {				answer = "false";			}			int ind = 0;			while (!answer.equals("false") && ind < answer.length()) {				if (!numbers.contains(answer.subSequence(ind, ind + 1))) {					answer = "false";				}				ind++;			}			if (!answer.equals("false")) {				if (answer.length() < 2) {					answer = "0000" + answer;				} else if (answer.length() < 3) {					answer = "000" + answer;				} else if (answer.length() < 4) {					answer = "00" + answer;				} else if (answer.length() < 5) {					answer = "0" + answer;				} else if (answer.length() > 5) {					answer = "false";				}			}		}		return answer;	}	public void fillCodeSetQueryReturnJPanels(String queryString, int columnIndInDataBase, String codeSetIdentifier, String callingFrame) {		JPanel condensedQueryReturnJPanel = new JPanel(new GridBagLayout());		JPanel fullQueryReturnJPanel = new JPanel(new GridBagLayout());		boolean matchNarrativeCase = false;		boolean searchMedicalCodeWholeWord = false;		boolean searchMedicalCodeNarrativeWholeWord = false;		int indiceOfMedicalCodeInputFoundInMedicalCode = -1;		int indiceOfNarrativeInputFoundInNarrative = -1;		GridBagConstraints buttonPanelConstraints = new GridBagConstraints();		GridBagConstraints fullQueryReturnPanelConstraints = new GridBagConstraints();		GridBagConstraints condensedQueryReturnPanelConstraints = new GridBagConstraints();		condensedQueryReturnJPanel.setBackground(Color.WHITE);		fullQueryReturnJPanel.setBackground(Color.WHITE);		fullQueryReturnPanelConstraints.insets = new Insets(4, 4, 4, 4);		fullQueryReturnPanelConstraints.anchor = GridBagConstraints.WEST;		fullQueryReturnPanelConstraints.gridx = 0;		fullQueryReturnPanelConstraints.gridy = 0;		condensedQueryReturnPanelConstraints.insets = new Insets(4, 4, 4, 4);		condensedQueryReturnPanelConstraints.anchor = GridBagConstraints.WEST;		condensedQueryReturnPanelConstraints.gridx = 0;		condensedQueryReturnPanelConstraints.gridy = 0;		if (columnIndInDataBase == 0) {			codeSetVector = PracticeWindow.tokenizeDatabase(Io.databaseRecords("partial medical code", codeSetIdentifier, PracticeWindow.parseCodeSetQuery(queryString)), codeSetIdentifier);		} else {			codeSetVector = PracticeWindow.tokenizeDatabase(Io.databaseRecords("any term", codeSetIdentifier, PracticeWindow.parseCodeSetQuery(queryString)), codeSetIdentifier);		}		if (codeSetVector == null) {			JLabel fullQueryReturnPanelCodeNotFoundJLabel = new JLabel("Code not found");			JLabel condensedQueryReturnPanelCodeNotFoundJLabel = new JLabel("Code not found");			fullQueryReturnPanelCodeNotFoundJLabel.setFont(SystemWindow.systemFont);			condensedQueryReturnPanelCodeNotFoundJLabel.setFont(SystemWindow.systemFont);			fullQueryReturnJPanel.add(fullQueryReturnPanelCodeNotFoundJLabel);			condensedQueryReturnJPanel.add(condensedQueryReturnPanelCodeNotFoundJLabel);		} else if (null != codeSetVector.elementAt(0).elementAt(0) && codeSetVector.elementAt(0).elementAt(0).equals("tooManyCodes")) {			JLabel fullQueryReturnPanelTooManyCodesJLabel = new JLabel("Too many records match the query, please enter a more constrictive query");			JLabel condensedQueryReturnPanelTooManyCodesJLabel = new JLabel("Too many records match the query, please enter a more constrictive query");			fullQueryReturnPanelTooManyCodesJLabel.setFont(SystemWindow.systemFont);			condensedQueryReturnPanelTooManyCodesJLabel.setFont(SystemWindow.systemFont);			addTalkbackText("Too many records match the query, please enter a more constrictive query", null, true);			fullQueryReturnJPanel.add(fullQueryReturnPanelTooManyCodesJLabel);			fullQueryReturnJPanel.add(condensedQueryReturnPanelTooManyCodesJLabel);		} else {			int numLines = codeSetVector.size();			SystemWindow.println("codeSetIdentifier: " + codeSetIdentifier + "; numLines: " + numLines);			if ((null != queryString && !queryString.equals(""))) {				int indle = 1;				int size = 3;				String medicalCode = null;				String medicalCodeNarrative = null;				fullQueryReturnPanelConstraints.gridy = 0;				int lineInd = 0;				int columnInd;				while (lineInd < numLines) {					if (!(codeSetIdentifier.equals("RXNCONSO09072010") && codeSetVector.elementAt(lineInd).elementAt(16).equals("Y"))) {						columnInd = 0;						fullQueryReturnPanelConstraints.gridx = 0;						while (columnInd < codeSetVector.elementAt(lineInd).size()) {							JButton fullCodeSetRecordColumnJButton = new JButton(codeSetVector.elementAt(lineInd).elementAt(columnInd));							fullCodeSetRecordColumnJButton.setName(codeSetIdentifier + "|" + codeSetVector.elementAt(lineInd).elementAt(0));							fullCodeSetRecordColumnJButton.setBackground(Color.WHITE);							fullCodeSetRecordColumnJButton.setBorder(null);							fullCodeSetRecordColumnJButton.setFont(SystemWindow.systemFont);							if (callingFrame.equals("chartingWindow")) {								fullCodeSetRecordColumnJButton.addActionListener(Device.device.workspace.chartingWindow);							} else if (callingFrame.equals("systemWindow")) {								fullCodeSetRecordColumnJButton.addActionListener(Device.device.workspace.systemWindow);							}							fullCodeSetRecordColumnJButton.setActionCommand("codeSetRecordColumnJButton" + "|" + lineInd);							fullQueryReturnJPanel.add(fullCodeSetRecordColumnJButton, fullQueryReturnPanelConstraints);							fullQueryReturnPanelConstraints.gridx++;							boolean doCondensedQueryReturnJPanel = false;							if (codeSetIdentifier.equals("CPT2009") || (codeSetIdentifier.equals("ICD10") && (columnInd == 0 || columnInd == 1)) || (codeSetIdentifier.equals("RXNCONSO09072010") && (columnInd == 0 || columnInd == 7 || columnInd == 14 || columnInd == 2)) || (codeSetIdentifier.equals("LOINC2.32") && (columnInd == 0 || columnInd == 45))) {								doCondensedQueryReturnJPanel = true;							}							JButton condensedCodeSetRecordColumnJButton;							if (doCondensedQueryReturnJPanel) {								condensedCodeSetRecordColumnJButton = new JButton(codeSetVector.elementAt(lineInd).elementAt(columnInd));								condensedCodeSetRecordColumnJButton.setBackground(Color.WHITE);								condensedCodeSetRecordColumnJButton.setName(codeSetIdentifier + "|" + codeSetVector.elementAt(lineInd).elementAt(0));								condensedCodeSetRecordColumnJButton.setBorder(new LineBorder(Color.LIGHT_GRAY));								condensedCodeSetRecordColumnJButton.setFont(SystemWindow.systemFont);								if (callingFrame.equals("chartingWindow")) {									condensedCodeSetRecordColumnJButton.addActionListener(Device.device.workspace.chartingWindow);								} else if (callingFrame.equals("systemWindow")) {									condensedCodeSetRecordColumnJButton.addActionListener(Device.device.workspace.systemWindow);								}								condensedCodeSetRecordColumnJButton.setActionCommand("codeSetRecordColumnJButton" + "|" + lineInd);								condensedQueryReturnJPanel.add(condensedCodeSetRecordColumnJButton, fullQueryReturnPanelConstraints);								condensedQueryReturnPanelConstraints.gridx++;							}							columnInd++;						}						fullQueryReturnPanelConstraints.gridy++;						condensedQueryReturnPanelConstraints.gridy++;					}					lineInd++;				}			}		}		orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel.removeAll();		orderEntryBottomCardedPanelCodedOrderEntryChoicesJPanel.add(fullQueryReturnJPanel);		orderEntryCodeChoicesJPanel.removeAll();		orderEntryCodeChoicesJPanel.add(condensedQueryReturnJPanel);		validate();		repaint();	}	public void fillOpenChartViaRecentlyOpenedPanel() {		openChartViaRecentlyOpenedJPanel.removeAll();		openChartViaRecentlyOpenedPanelConstraints.anchor = GridBagConstraints.WEST;		openChartViaRecentlyOpenedPanelConstraints.insets = new Insets(4, 4, 0, 4);		openChartViaRecentlyOpenedPanelConstraints.gridy = 1;		openChartViaRecentlyOpenedPanelConstraints.gridwidth = 4;		JButton recentChartJButton;		String chartDemographicInformation;		String patientName;		String patientSex;		String birthDate;		Vector<Object> patientIndexedInformation;		int ind = 0;		while (ind < recentChartID.size()) {			chartDemographicInformation = (String) recentChartID.elementAt(ind);			patientIndexedInformation = PracticeWindow.getHumanReadablePatientIndexedInformation(Integer.parseInt((String) recentChartID.elementAt(ind)));			patientName = ((String) patientIndexedInformation.elementAt(0));			patientSex = ((String) patientIndexedInformation.elementAt(5));			birthDate = ((String) (patientIndexedInformation.elementAt(4)));			if (patientName != null && !patientName.equals("")) {				chartDemographicInformation = " " + chartDemographicInformation + "; " + patientName;			}			if (patientSex != null && !patientSex.equals("")) {				chartDemographicInformation = chartDemographicInformation + "; " + patientSex;			}			if (birthDate != null && !birthDate.equals("")) {				chartDemographicInformation = chartDemographicInformation + "; " + birthDate + " ";			}			recentChartJButton = new JButton(chartDemographicInformation);			recentChartJButton.setName((String) recentChartID.elementAt(ind));			recentChartJButton.setMnemonic('V');			recentChartJButton.setBackground(SystemWindow.buttonColor);			recentChartJButton.setBorder(SystemWindow.buttonBorder);			recentChartJButton.setFont(new Font("arial", Font.BOLD, 15));			recentChartJButton.setRolloverEnabled(false);			recentChartJButton.setFocusPainted(false);			recentChartJButton.addActionListener(this);			recentChartJButton.setActionCommand("recentChartJButton");			if (ind == recentChartID.size() - 1) {				openChartViaRecentlyOpenedPanelConstraints.insets = new Insets(4, 4, 4, 4);			}			openChartViaRecentlyOpenedPanelConstraints.gridy = openChartViaRecentlyOpenedPanelConstraints.gridy + 1;			openChartViaRecentlyOpenedJPanel.add(recentChartJButton, openChartViaRecentlyOpenedPanelConstraints);			ind++;		}		JLabel openChartViaRecentlyOpenedPanelHeader1JLabel = new JLabel("Recently opened:");		JLabel openChartViaRecentlyOpenedPanelHeader2JLabel = new JLabel("Chart ID:  Name:    Sex:     Born:");		openChartViaRecentlyOpenedPanelHeader1JLabel.setFont(SystemWindow.systemFont);		openChartViaRecentlyOpenedPanelHeader2JLabel.setFont(SystemWindow.systemFont);		if (recentChartID.size() > 0) {			openChartViaRecentlyOpenedPanelConstraints.anchor = GridBagConstraints.CENTER;			openChartViaRecentlyOpenedPanelConstraints.gridy = 0;			openChartViaRecentlyOpenedJPanel.add(openChartViaRecentlyOpenedPanelHeader1JLabel, openChartViaRecentlyOpenedPanelConstraints);			openChartViaRecentlyOpenedPanelConstraints.anchor = GridBagConstraints.WEST;			openChartViaRecentlyOpenedPanelConstraints.gridy = 1;			openChartViaRecentlyOpenedJPanel.add(openChartViaRecentlyOpenedPanelHeader2JLabel, openChartViaRecentlyOpenedPanelConstraints);		}		validate();		repaint();	}	private byte[] foundPatientChartPassword(String chartIDToFindPasswordFor) {		byte[] foundPatientChartPassword = null;		boolean found = false;		int ind = 1;		int numTotalCharts = ((Vector) (((Vector) (Access.rootAdministrator.elementAt(1))).elementAt(0))).size();		while ((!found) && (ind < numTotalCharts)) {			if (chartIDToFindPasswordFor.equals((String) (((Vector) (((Vector) (((Vector) (((Vector) (Access.rootAdministrator.elementAt(1))).elementAt(0))).elementAt(ind))).elementAt(0))).elementAt(0)))) {				found = true;				foundPatientChartPassword = ((byte[]) (((Vector) (((Vector) (((Vector) (((Vector) (Access.rootAdministrator.elementAt(1))).elementAt(0))).elementAt(ind))).elementAt(0))).elementAt(1)));			}			ind++;		}		return foundPatientChartPassword;	}	private boolean isObjectNullXorBlankString(Object object) {		boolean ifStringIsItBlank = false;		boolean ifNotStringIsItNull = false;		try {			if (((JTextArea) (object)).getText().equals("")) {				ifStringIsItBlank = true;			}		} catch (Exception e) {			ifStringIsItBlank = false;		}		try {			if (object == null) {				ifNotStringIsItNull = true;			}		} catch (Exception e) {			ifNotStringIsItNull = false;		}		return (ifStringIsItBlank | ifNotStringIsItNull);	}	public void makeNewPatientIndexObject() {		Integer newChartID = ((Vector) (((Vector) (Access.rootAdministrator.elementAt(1))).elementAt(0))).size();		String leadingZeros = "";		if (newChartID.toString().length() == 1) {			leadingZeros = "0000";		}		if (newChartID.toString().length() == 2) {			leadingZeros = "000";		}		if (newChartID.toString().length() == 3) {			leadingZeros = "00";		}		if (newChartID.toString().length() == 4) {			leadingZeros = "0";		}		openChartID = leadingZeros + newChartID.toString();		KeyGenerator kgen;		try {			kgen = KeyGenerator.getInstance("AES");			kgen.init(128);			Vector<Vector<Object>> initialPatientIndexInformationObjectVector = new Vector<Vector<Object>>();			initialPatientIndexInformationObjectVector.add(new Vector<Object>());			initialPatientIndexInformationObjectVector.elementAt(0).add(openChartID);			SecretKey sKey = kgen.generateKey();			byte[] raw = sKey.getEncoded();			initialPatientIndexInformationObjectVector.elementAt(0).add(raw);			initialPatientIndexInformationObjectVector.add(new Vector<Object>());			int ind = 0;			while (ind < 10) {				initialPatientIndexInformationObjectVector.elementAt(1).add(null);				ind++;			}			initialPatientIndexInformationObjectVector.add(new Vector<Object>());			initialPatientIndexInformationObjectVector.elementAt(2).add(new Date().toString() + ": chart created by " + Access.getUserName(openChartID));			initialPatientIndexInformationObjectVector.add(new Vector<Object>());			initialPatientIndexInformationObjectVector.elementAt(3).add(null);			initialPatientIndexInformationObjectVector.add(new Vector<Object>());			initialPatientIndexInformationObjectVector.elementAt(4).add(null);			initialPatientIndexInformationObjectVector.add(new Vector<Object>());			ind = 0;			while (ind < 17) {				initialPatientIndexInformationObjectVector.elementAt(5).add(null);				ind++;			}			initialPatientIndexInformationObjectVector.add(new Vector<Object>());			initialPatientIndexInformationObjectVector.elementAt(6).add(null);			initialPatientIndexInformationObjectVector.add(new Vector<Object>());			initialPatientIndexInformationObjectVector.elementAt(7).add(null);			initialPatientIndexInformationObjectVector.add(new Vector<Object>());			initialPatientIndexInformationObjectVector.elementAt(8).add(null);			((Vector) (((Vector) (Access.rootAdministrator.elementAt(1))).elementAt(0))).add(initialPatientIndexInformationObjectVector.clone());			((Vector) (Access.patientDataStruct.elementAt(3))).setElementAt(initialPatientIndexInformationObjectVector.clone(), 7);		} catch (NoSuchAlgorithmException ex) {			SystemWindow.println("NoSuch{Encryption}AlgorithmException in chartingWindow's makeNewPatientIndexObject()");		}	}	public void makeChartPages() {		chartFolderPanelBasePanelCardLayout.show(chartFolderPanelBaseJPanel, "chartFolderJPanel");		GridBagConstraints marginedPaperJPanelConstraints = new GridBagConstraints();		GridBagConstraints sectionPanePanelConstraints = new GridBagConstraints();		marginedPaperJPanelConstraints.insets = new Insets(10, 22, 22, 22);		sectionPanePanelConstraints.anchor = GridBagConstraints.NORTHWEST;		int numPagesInSection = 0;		GridBagConstraints chartPanelsConstraints = new GridBagConstraints();		JPanel marginedPaperJPanel = new JPanel(new GridBagLayout());		marginedPaperJPanel.setBackground(Color.WHITE);		marginedPaperJPanel.add(getTemplatePage(0, 1)[0], marginedPaperJPanelConstraints);		chartPanelsConstraints.insets = new Insets(12, 12, 6, 0);		chartPanelsConstraints.anchor = GridBagConstraints.NORTHWEST;		chartCoverJPanel.add(marginedPaperJPanel, chartPanelsConstraints);		int chartSection = 1;		while (chartSection < 5) {			if (!(Access.isUserLoggedIn && ((chartSection == 1 && Access.getUser(Access.loggedOnUserID, "chartsDemographicsAuthorization").equals("no access")) || (chartSection == 4 && Access.getUser(Access.loggedOnUserID, "chartsInsuranceAuthorization").equals("no access"))))) {				int pagePlace = 1;				numPagesInSection = ((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(chartSection))).size() - 1;				while (pagePlace <= numPagesInSection) {					int oddOrEven = pagePlace;					while (oddOrEven > 1) {						oddOrEven = oddOrEven - 2;					}					if (oddOrEven == 1) {						chartPanelsConstraints.gridy = (pagePlace + 1) / 2 - 1;						chartPanelsConstraints.gridx = 0;						if (pagePlace == 1) {							chartPanelsConstraints.insets = new Insets(12, 12, 6, 0);						} else {							chartPanelsConstraints.insets = new Insets(6, 12, 6, 0);						}					} else {						chartPanelsConstraints.gridy = pagePlace / 2 - 1;						chartPanelsConstraints.gridx = 2;						if (pagePlace == 2) {							chartPanelsConstraints.insets = new Insets(12, 0, 6, 12);						} else {							chartPanelsConstraints.insets = new Insets(6, 0, 6, 12);						}					}					if (chartSection == 1) {						marginedPaperJPanel = new JPanel(new GridBagLayout());						marginedPaperJPanel.setBackground(Color.WHITE);						marginedPaperJPanel.add(getTemplatePage(1, pagePlace)[0], marginedPaperJPanelConstraints);						demographicsJPanel.add(marginedPaperJPanel, chartPanelsConstraints);					} else if (chartSection == 2) {						marginedPaperJPanel = new JPanel(new GridBagLayout());						marginedPaperJPanel.setBackground(Color.WHITE);						marginedPaperJPanel.add(getTemplatePage(2, pagePlace)[0], marginedPaperJPanelConstraints);						activitiesJPanel.add(marginedPaperJPanel, chartPanelsConstraints);					} else if (chartSection == 3) {						marginedPaperJPanel = new JPanel(new GridBagLayout());						marginedPaperJPanel.setBackground(Color.WHITE);						marginedPaperJPanel.add(getTemplatePage(3, pagePlace)[0], marginedPaperJPanelConstraints);						historyJPanel.add(marginedPaperJPanel, chartPanelsConstraints);					} else if (chartSection == 4) {						marginedPaperJPanel = new JPanel(new GridBagLayout());						marginedPaperJPanel.setBackground(Color.WHITE);						marginedPaperJPanel.add(getTemplatePage(4, pagePlace)[0], marginedPaperJPanelConstraints);						insuranceJPanel.add(marginedPaperJPanel, chartPanelsConstraints);					}					pagePlace++;				}				chartPanelsConstraints.gridheight = chartPanelsConstraints.gridy + 1;				chartPanelsConstraints.gridy = 0;				chartPanelsConstraints.gridx = 1;				chartPanelsConstraints.weighty = 1;				chartPanelsConstraints.fill = GridBagConstraints.BOTH;				chartPanelsConstraints.insets = new Insets(0, 0, 0, 0);				if (chartSection == 0) {				} else if (chartSection == 1) {					demographicsJPanel.add(middleCleft(), chartPanelsConstraints);				} else if (chartSection == 2) {					activitiesJPanel.add(middleCleft(), chartPanelsConstraints);				} else if (chartSection == 3) {					historyJPanel.add(middleCleft(), chartPanelsConstraints);				} else if (chartSection == 4) {					insuranceJPanel.add(middleCleft(), chartPanelsConstraints);				}				chartPanelsConstraints.weighty = 0;				chartPanelsConstraints.fill = GridBagConstraints.NONE;				chartPanelsConstraints.gridheight = 1;				chartSection++;			}		}		chartCoverPaneJPanel.setOpaque(true);		chartCoverPaneJPanel.setBackground(manilaColor);		demographicsPaneJPanel.setOpaque(true);		demographicsPaneJPanel.setBackground(manilaColor);		chartCoverPaneJPanel.add(chartCoverJPanel, sectionPanePanelConstraints);		demographicsPaneJPanel.add(demographicsJPanel, sectionPanePanelConstraints);		activitiesPaneJPanel.add(orderEntryPanelBaseJPanel, sectionPanePanelConstraints);		sectionPanePanelConstraints.gridy = 1;		activitiesPaneJPanel.add(activitiesJPanel, sectionPanePanelConstraints);		sectionPanePanelConstraints.gridy = 0;		historyPaneJPanel.add(historyJPanel, sectionPanePanelConstraints);		insurancePaneJPanel.add(insuranceJPanel, sectionPanePanelConstraints);		JPanel panePanelPusherJPanel0 = new JPanel();		JPanel panePanelPusherJPanel1 = new JPanel();		JPanel panePanelPusherJPanel2 = new JPanel();		JPanel panePanelPusherJPanel3 = new JPanel();		JPanel panePanelPusherJPanel4 = new JPanel();		panePanelPusherJPanel0.setOpaque(false);		panePanelPusherJPanel1.setOpaque(false);		panePanelPusherJPanel2.setOpaque(false);		panePanelPusherJPanel3.setOpaque(false);		panePanelPusherJPanel4.setOpaque(false);		sectionPanePanelConstraints.gridy = 1;		sectionPanePanelConstraints.gridx = 1;		sectionPanePanelConstraints.weighty = 1;		sectionPanePanelConstraints.weightx = 1;		sectionPanePanelConstraints.fill = GridBagConstraints.BOTH;		chartCoverPaneJPanel.add(panePanelPusherJPanel0, sectionPanePanelConstraints);		demographicsPaneJPanel.add(panePanelPusherJPanel1, sectionPanePanelConstraints);		sectionPanePanelConstraints.gridy = 2;		activitiesPaneJPanel.add(panePanelPusherJPanel2, sectionPanePanelConstraints);		sectionPanePanelConstraints.gridy = 1;		historyPaneJPanel.add(panePanelPusherJPanel3, sectionPanePanelConstraints);		insurancePaneJPanel.add(panePanelPusherJPanel4, sectionPanePanelConstraints);	}	private byte[] makeRawFromPassword(char[] pSelectedNewUserPassword) {		char[] vitalityPassword1 = "z5T3zIi93F".toCharArray();		char[] vitalityPassword2 = "S8n952odk".toCharArray();		char[] vitalityPassword3 = "0lkqv63p".toCharArray();		char[] vitalityPassword4 = "Jbn4cW7".toCharArray();		char[] vitalityPassword5 = "tK807p".toCharArray();		byte[] superPasswordBytes = new byte[16];		if (pSelectedNewUserPassword.length == 6) {			superPasswordBytes = combineCharArraysAndReturnPasswordBytes(vitalityPassword1, pSelectedNewUserPassword);		}		if (pSelectedNewUserPassword.length == 7) {			superPasswordBytes = combineCharArraysAndReturnPasswordBytes(vitalityPassword2, pSelectedNewUserPassword);		}		if (pSelectedNewUserPassword.length == 8) {			superPasswordBytes = combineCharArraysAndReturnPasswordBytes(vitalityPassword3, pSelectedNewUserPassword);		}		if (pSelectedNewUserPassword.length == 9) {			superPasswordBytes = combineCharArraysAndReturnPasswordBytes(vitalityPassword4, pSelectedNewUserPassword);		}		if (pSelectedNewUserPassword.length == 10) {			superPasswordBytes = combineCharArraysAndReturnPasswordBytes(vitalityPassword5, pSelectedNewUserPassword);		}		return superPasswordBytes;	}	private byte[] combineCharArraysAndReturnPasswordBytes(char[] pvitalityPassword, char[] selectedNewUserPasswordChars) {		char[] pSuperNewPasswordChars = new char[16];		byte[] pSuperNewPasswordBytes = new byte[16];		int ind = 0;		do {			pSuperNewPasswordChars[ind] = pvitalityPassword[ind];			ind++;		} while (ind < pvitalityPassword.length);		do {			pSuperNewPasswordChars[ind] = selectedNewUserPasswordChars[ind - pvitalityPassword.length];			ind++;		} while (ind < 16);		ind = 0;		do {			pSuperNewPasswordBytes[ind] = (byte) pSuperNewPasswordChars[ind];			ind++;		} while (ind < 16);		return pSuperNewPasswordBytes;	}	private JPanel middleCleft() {		JPanel middleCleftJPanel = new JPanel(new GridBagLayout());		middleCleftJPanel.setBorder(new CompoundBorder(new CompoundBorder(new CompoundBorder(new CompoundBorder(new MatteBorder(0, 1, 0, 0, new Color(0, 0, 0, 10)), new MatteBorder(0, 1, 0, 0, new Color(0, 0, 0, 16))), new CompoundBorder(new MatteBorder(0, 1, 0, 0, new Color(0, 0, 0, 24)), new MatteBorder(0, 1, 0, 0, new Color(20, 20, 20, 34)))), new CompoundBorder(new CompoundBorder(new MatteBorder(0, 1, 0, 0, new Color(40, 40, 40, 44)), new MatteBorder(0, 1, 0, 0, new Color(60, 60, 60, 60))), new CompoundBorder(new MatteBorder(0, 1, 0, 0, new Color(60, 60, 60, 66)), new MatteBorder(0, 1, 0, 0, new Color(60, 60, 60, 72))))), new CompoundBorder(new CompoundBorder(new CompoundBorder(new MatteBorder(0, 1, 0, 0, new Color(255, 255, 255, 112)), new MatteBorder(0, 1, 0, 0, new Color(255, 255, 255, 90))), new CompoundBorder(new MatteBorder(0, 1, 0, 0, new Color(255, 255, 255, 88)), new MatteBorder(0, 1, 0, 0, new Color(255, 255, 255, 72)))), new CompoundBorder(new CompoundBorder(new MatteBorder(0, 1, 0, 0, new Color(255, 255, 255, 52)), new MatteBorder(0, 1, 0, 0, new Color(255, 255, 255, 36))), new CompoundBorder(new MatteBorder(0, 1, 0, 0, new Color(255, 255, 255, 24)), new MatteBorder(0, 1, 0, 0, new Color(255, 255, 255, 12)))))));		middleCleftJPanel.setBackground(manilaColor);		return middleCleftJPanel;	}	public void openChart(String chartIDToOpen) {		SystemWindow.println("openChart(" + chartIDToOpen + ")");		if (Access.isUserLoggedIn && !Access.getUser(Access.loggedOnUserID, "chartsActivitiesAuthorization").equals("manage")) {			orderEntryPanelBaseJPanel.setVisible(false);		} else {			orderEntryPanelBaseJPanel.setVisible(true);		}		if (!chartIsOpen && (Access.isRootAdministratorLoggedIn || !(Access.getUser(Access.loggedOnUserID, "chartsDemographicsAuthorization").equals("no access") && Access.getUser(Access.loggedOnUserID, "chartsActivitiesAuthorization").equals("no access") && Access.getUser(Access.loggedOnUserID, "chartsHistoryAuthorization").equals("no access") && Access.getUser(Access.loggedOnUserID, "chartsInsuranceAuthorization").equals("no access")))) {			try {				Io.in("enc", chartIDToOpen, foundPatientChartPassword(chartIDToOpen));				openChartID = chartIDToOpen;				String chartOpenedLogEntryString = new Date().toString() + ": chart opened by " + Access.getUserName(openChartID);				((Vector) (((Vector) (((Vector) (((Vector) (Access.rootAdministrator.elementAt(1))).elementAt(0))).elementAt((int) (Integer.parseInt(chartIDToOpen))))).elementAt(2))).add(chartOpenedLogEntryString);				((Vector) (((Vector) ((Vector) (Access.patientDataStruct.elementAt(3))).elementAt(7)).elementAt(2))).add(chartOpenedLogEntryString);				makeChartPages();				validate();				repaint();				System.out.println("openChart() - openChartID: " + openChartID);				recentChartID.add(openChartID);				int ind = 0;				while (ind < recentChartID.size() - 1) {					if (((String) recentChartID.elementAt(ind)).equals(openChartID)) {						System.out.println("removing preceding duplicate chart ID entry");						recentChartID.remove(ind);					}					ind++;				}				chartIsOpen = true;				addTalkbackText("Chart " + openChartID + " opened.", null, true);			} catch (Exception e) {				SystemWindow.println("Fail at chartingWindow Read.in(\"enc\", chartIDToOpen, foundPatientChartPassword(chartIDToOpen));");				e.printStackTrace();			}		} else {			addTalkbackText("Authorization must be set to access charts", null, true);		}	}	public void billingProcessor() {	}	private void saveChart() {		byte[] foundPatientChartPassword;		foundPatientChartPassword = foundPatientChartPassword(openChartID);		try {			Io.out("enc", Access.patientDataStruct, openChartID + "_vitality.dat", foundPatientChartPassword);			signOffJButton.setEnabled(false);			signOffJButton.setBackground(SystemWindow.buttonColor);			addTalkbackText("Everything signed-off", null, true);			needSignOff = false;		} catch (Exception ex) {			ex.printStackTrace();			addTalkbackText("Fail: chartingWindow.saveChart()", null, true);		}		validate();	}	public boolean saveDataItemToPatientDataStruct(Object dataObjectToSave, int sectionNumber, int pageNumber, int itemNumber) {		try {			Vector dataCell = (Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).elementAt(pageNumber))).elementAt(itemNumber));			if (null != dataCell.elementAt(0)) {				Vector<Object> changeVector = new Vector<Object>(3);				changeVector.add(dataCell.elementAt(0));				changeVector.add(dataCell.elementAt(1));				changeVector.add(dataCell.elementAt(2));				((Vector) (dataCell.elementAt(3))).add(changeVector.clone());			}			dataCell.setElementAt(dataObjectToSave, 0);			System.out.println("createEventInformation(null) called: ");			dataCell.setElementAt(createEventInformation("not activity order"), 2);			if (itemNumber != 0 && null != ((Object) (dataCell.elementAt(0))) && ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00108") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00111") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00114") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00194") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("patientEmail") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00110") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00113")) {				savePatientIndexedInformationFromDataCellToPatientIndex(dataCell);			}			validate();			repaint();			try {				Io.out("enc", Access.patientDataStruct, openChartID + "_vitality.dat", foundPatientChartPassword(openChartID));				Io.out("sys", Access.rootAdministrator, "system_vitality.dat", Device.device.workspace.raw);				itemsToSignAndProcess.add(new String[4]);				itemsToSignAndProcess.lastElement()[0] = "not activity order";				itemsToSignAndProcess.lastElement()[1] = String.valueOf(sectionNumber);				itemsToSignAndProcess.lastElement()[2] = String.valueOf(pageNumber);				itemsToSignAndProcess.lastElement()[3] = String.valueOf(itemNumber);				signOffJButton.setEnabled(true);			} catch (IOException iOE) {				iOE.printStackTrace();				SystemWindow.println("Critical error: writing patient chart struct in chartingWindow changePreviousDataCellPrompt.");			}			return true;		} catch (Exception ex) {			ex.printStackTrace();			SystemWindow.println("Critical error: saveDataItemToPatientDataStructAndHighlightProcessedStateInDisplayedContainer patient chart struct in chartingWindow changePreviousDataCellPrompt.");			return false;		}	}	public Vector createEventInformation(String eventItem) {		Vector eventInformation = new Vector(3, 1);		if (signOffAndProcessOnEntry || eventItem.equals("activity item")) {			eventInformation.add(0, "signed but not processed");			System.out.println("eventInformation.add(0, \"signed but not processed\");");		} else {			eventInformation.add(0, "not signed");			System.out.println("eventInformation.add(0, \"not signed\");");		}		eventInformation.add(1, new Date().toString());		eventInformation.add(2, Access.loggedOnUserID);		String fullUserName = Access.getUserName(Access.loggedOnUserID);		eventInformation.add(3, fullUserName);		eventInformation.add(4, Access.getUser(Access.loggedOnUserID, "facility"));		eventInformation.add(5, Access.loggedOnUserID);		return eventInformation;	}	public void savePatientIndexedInformationFromDataCellToPatientIndex(Vector dataCell) {		String givenAtomicIdentifier = ((String) (((Vector) dataCell.elementAt(1))).elementAt(2));		Vector patientIndex = ((Vector) (((Vector) (Access.rootAdministrator.elementAt(1))).elementAt(0)));		if (givenAtomicIdentifier.equals("HL7_2.3.1|00108|XPN|1|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(1))).setElementAt(((Object) (dataCell.elementAt(0))), 1);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00108|XPN|2|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(1))).setElementAt(((Object) (dataCell.elementAt(0))), 2);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00108|XPN|3|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(1))).setElementAt(((Object) (dataCell.elementAt(0))), 3);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00108|XPN|4|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(1))).setElementAt(((Object) (dataCell.elementAt(0))), 4);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00108|XPN|5|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(1))).setElementAt(((Object) (dataCell.elementAt(0))), 5);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00108|XPN|6|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(1))).setElementAt(((Object) (dataCell.elementAt(0))), 6);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00108|XPN|7|IS")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(1))).setElementAt(((Object) (dataCell.elementAt(0))), 7);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00194|XTN")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(3))).setElementAt(((Object) (dataCell.elementAt(0))), 0);		} else if (givenAtomicIdentifier.equals("patientEmail")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(4))).setElementAt(((Object) (dataCell.elementAt(0))), 0);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|1|SAD|1|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 0);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|1|SAD|2|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 1);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|1|SAD|3|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 2);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|2|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 3);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|3|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 4);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|4|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 5);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|5|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 6);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|6|ID")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 7);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|7|ID")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 8);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|8|ST")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 9);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|9|IS")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 10);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|10|IS")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 11);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|11|ID")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 12);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|12|DR|1|TS")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 13);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|12|DR|2|TS")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 14);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|13|TS")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 15);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00114|XAD|14|TS")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(5))).setElementAt(((Object) (dataCell.elementAt(0))), 16);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00111|IS")) {			((Vector) (((Vector) (((Vector) (((Vector) (Access.rootAdministrator.elementAt(1))).elementAt(0))).elementAt(Integer.parseInt(openChartID)))).elementAt(6))).setElementAt(((Object) (dataCell.elementAt(0))), 0);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00110|TS")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(7))).setElementAt(((Object) (dataCell.elementAt(0))), 0);		} else if (givenAtomicIdentifier.equals("HL7_2.3.1|00113|IS")) {			((Vector) (((Vector) (patientIndex.elementAt(Integer.parseInt(openChartID)))).elementAt(8))).setElementAt(((Object) (dataCell.elementAt(0))), 0);		}	}	@Override	public void focusGained(FocusEvent e) {		if (e.getComponent().getName().startsWith("timeStampCalendar")) {			e.getComponent().setBackground(Color.WHITE);			String componentName = e.getComponent().getName();			int firstDeliminatorIndex = componentName.indexOf("|");			int secondDeliminatorIndex = componentName.indexOf("|", firstDeliminatorIndex + 1);			int thirdDeliminatorIndex = componentName.indexOf("|", secondDeliminatorIndex + 1);			int sectionNumber = Integer.parseInt(componentName.substring(firstDeliminatorIndex + 1, secondDeliminatorIndex));			int pageNumber = Integer.parseInt(componentName.substring(secondDeliminatorIndex + 1, thirdDeliminatorIndex));			int itemNumber = Integer.parseInt(componentName.substring(thirdDeliminatorIndex + 1, componentName.length()));			if (null != ((String) ((((Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).elementAt(pageNumber))).elementAt(itemNumber))).elementAt(0))))) {				activeCalendar.setTimeInMillis(Long.parseLong((String) ((((Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).elementAt(pageNumber))).elementAt(itemNumber))).elementAt(0)))));			} else if (null == activeCalendar) {				activeCalendar = Calendar.getInstance();			}			activeCalendarJPanel = ((JPanel) (e.getComponent().getParent()));			activeCalendarDayOfWeekJTextField = (JTextField) (activeCalendarJPanel.getComponent(1));			activeCalendarMonthJTextField = (JTextField) (activeCalendarJPanel.getComponent(3));			activeCalendarDayOfMonthJTextField = (JTextField) (activeCalendarJPanel.getComponent(4));			activeCalendarYearJTextField = (JTextField) (activeCalendarJPanel.getComponent(6));			activeCalendarHourJTextField = (JTextField) (activeCalendarJPanel.getComponent(8));			activeCalendarMinuteJTextField = (JTextField) (activeCalendarJPanel.getComponent(10));			activeCalendarAMPMJTextField = (JTextField) (activeCalendarJPanel.getComponent(11));			rollAndFill(null, 0);		}	}	@Override	public void focusLost(FocusEvent e) {		if (e.getComponent().getName().startsWith("dataItemContainer|") || e.getComponent().getName().startsWith("timeStampCalendar")) {			saveFocusLostItem(e.getComponent(), "focusLost");		}	}	private void saveFocusLostItem(Component focusLostComponent, String callingObject) {		Object focusLostObject = null;		String focusLostComponentName = focusLostComponent.getName();		System.out.println(" ");		System.out.println("focusLostComponentName: " + focusLostComponentName);		System.out.println(" ");		int firstDeliminatorIndex = focusLostComponentName.indexOf("|");		int secondDeliminatorIndex = focusLostComponentName.indexOf("|", firstDeliminatorIndex + 1);		int thirdDeliminatorIndex = focusLostComponentName.indexOf("|", secondDeliminatorIndex + 1);		focusLostChartSection = Integer.parseInt(focusLostComponentName.substring(firstDeliminatorIndex + 1, secondDeliminatorIndex));		focusLostPageNumber = Integer.parseInt(focusLostComponentName.substring(secondDeliminatorIndex + 1, thirdDeliminatorIndex));		focusLostItemNumber = Integer.parseInt(focusLostComponentName.substring(thirdDeliminatorIndex + 1, focusLostComponentName.length()));		Vector dataCell = ((Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(focusLostChartSection))).elementAt(focusLostPageNumber))).elementAt(focusLostItemNumber)));		Object storedDataObject = ((Object) dataCell.elementAt(0));		Vector eventInformation = (Vector) (dataCell.elementAt(2));		String elementDataType = ((String) (((Vector) (dataCell.elementAt(1))).elementAt(2)));		String colloquialDataType = ((String) (((Vector) (dataCell.elementAt(1))).elementAt(1)));		System.out.println("elementDataType: " + elementDataType);		if (elementDataType.endsWith("TS")) {			syncAppointmentCalendarWithTalkback(((JTextField) focusLostComponent));			focusLostObject = String.valueOf(activeCalendar.getTimeInMillis());			System.out.println(" ");			System.out.println("activeCalendar: " + activeCalendar.toString());			System.out.println(" ");		} else if (colloquialDataType.equals("text")) {			focusLostObject = (((JTextComponent) focusLostComponent).getText());		}		if (null == eventInformation && !focusLostObject.equals("") && saveDataItemToPatientDataStruct(focusLostObject, focusLostChartSection, focusLostPageNumber, focusLostItemNumber)) {			if (signOffAndProcessOnEntry) {				signOffAndHighlightAndProcessDataCellItems();			} else {				highlightDataCellDisplayItem(focusLostComponent, dataCell);			}		} else if ((null != eventInformation && !focusLostObject.equals("")) && !focusLostObject.equals(storedDataObject)) {			if (elementDataType.endsWith("TS")) {			} else if (colloquialDataType.equals("text")) {				((JTextComponent) focusLostComponent).setText((String) storedDataObject);				focusLostDataCellDisplayObjectWithExtraDataDatatype = "text";			} else {			}			focusLostDataCellDisplayObjectWithExtraDataToAddComponent = focusLostComponent;			focusLostBeforeChangeObject = focusLostObject;			mainPanelCoverJPanel.setVisible(true);			promptToReplaceDataItemYesJButton.setFont(SystemWindow.systemFont);			promptToReplaceDataItemYesJButton.setBackground(SystemWindow.buttonColor);			promptToReplaceDataItemNoJButton.setFont(SystemWindow.systemFont);			promptToReplaceDataItemNoJButton.setBackground(SystemWindow.buttonColor);			promptToReplaceDataItemJPopupMenu.show(focusLostComponent, 0, focusLostComponent.getHeight());		}	}	private void highlightDataCellDisplayItem(Component dataCellDisplayComponent, Vector dataCell) {		Vector storedEventInformation;		String dataCellProcessingState = null;		Vector itemAttributes;		String colloquialDataType = null;		String elementDataType = null;		boolean isRequiredField = false;		storedEventInformation = (Vector) (dataCell.elementAt(2));		if (null != storedEventInformation) {			dataCellProcessingState = (((String) storedEventInformation.elementAt(0)));		}		itemAttributes = ((Vector) (dataCell.elementAt(1)));		colloquialDataType = ((String) (itemAttributes.elementAt(1)));		elementDataType = ((String) (itemAttributes.elementAt(2)));		isRequiredField = (boolean) ((Boolean) (itemAttributes.elementAt(3)));		Color highlightColor = Color.WHITE;		if (isRequiredField && null == dataCellProcessingState) {			highlightColor = importantFieldHighlightColor;		} else if (null != dataCellProcessingState) {			if (dataCellProcessingState.equals("not signed") || dataCellProcessingState.equals("belay signing")) {				highlightColor = unsignedFieldVeryLightGrayColor;				System.out.println("unsignedFieldVeryLightGrayColor: " + unsignedFieldVeryLightGrayColor);			} else if (!dataCellProcessingState.startsWith("processed")) {				highlightColor = unprocessedFieldHighlightColor;				System.out.println("unprocessedFieldHighlightColor: " + unprocessedFieldHighlightColor);			} else if (!dataCellProcessingState.startsWith("error in processing, could not process")) {				highlightColor = processingFailedFieldHighlightColor;				System.out.println("processingFailedFieldHighlightColor: " + processingFailedFieldHighlightColor);			}		}		if (elementDataType.endsWith("TS")) {		} else if (colloquialDataType.equals("text")) {			((JTextComponent) dataCellDisplayComponent).setBackground(highlightColor);			focusLostDataCellDisplayObjectWithExtraDataDatatype = "text";		}	}	public JPanel[] getTemplatePage(int sectionNumber, int pageNumber) {		JPanel existingTemplatePageJPanel = new JPanel();		JPanel existingTemplatePageNumbersJPanel = new JPanel();		JPanel dataCellItemJPanel;		JPanel dataItemNumberJPanel;		JLabel itemNumberJLabel;		String sectionName = null;		if (sectionNumber == 0) {			sectionName = "CHART_COVER";		} else if (sectionNumber == 1) {			sectionName = "DEMOGRAPHICS";		} else if (sectionNumber == 2) {			sectionName = "ACTIVITIES";		} else if (sectionNumber == 3) {			sectionName = "HISTORY";		} else if (sectionNumber == 4) {			sectionName = "INSURANCE";		}		existingTemplatePageJPanel.setLayout(null);		existingTemplatePageNumbersJPanel.setLayout(null);		existingTemplatePageJPanel.setBackground(Color.WHITE);		existingTemplatePageNumbersJPanel.setBackground(Color.WHITE);		existingTemplatePageJPanel.setSize(SystemWindow.templatePageDimension);		existingTemplatePageJPanel.setPreferredSize(SystemWindow.templatePageDimension);		existingTemplatePageNumbersJPanel.setSize(SystemWindow.templatePageDimension);		existingTemplatePageNumbersJPanel.setPreferredSize(SystemWindow.templatePageDimension);		if (sectionName.equals("CHART_COVER")) {			JLabel patientNameJLabel = new JLabel("Patient name: " + "");		} else {			int itemNumberInd = 0;			int numItemsOnPage = ((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).elementAt(pageNumber))).size();			while (itemNumberInd < numItemsOnPage) {				dataCellItemJPanel = createDataCellItemJPanel(sectionNumber, pageNumber, itemNumberInd);				Vector dataCell = (Vector) ((((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).elementAt(pageNumber))).elementAt(itemNumberInd)));				if (itemNumberInd != 0 && null != ((Object) (dataCell.elementAt(0))) && ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00108") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00111") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00114") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00194") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("patientEmail") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00110") || ((String) (((Vector) dataCell.elementAt(1))).elementAt(2)).startsWith("HL7_2.3.1|00113")) {					savePatientIndexedInformationFromDataCellToPatientIndex(dataCell);				}				dataItemNumberJPanel = new JPanel(new GridBagLayout());				dataItemNumberJPanel.setBounds(dataCellItemJPanel.getBounds());				dataItemNumberJPanel.setOpaque(false);				dataItemNumberJPanel.setForeground(new Color(0, 156, 164));				itemNumberJLabel = new JLabel(String.valueOf(itemNumberInd));				itemNumberJLabel.setBackground(Color.WHITE);				itemNumberJLabel.setFont(new Font("Electron", Font.BOLD, 17));				itemNumberJLabel.setOpaque(true);				dataItemNumberJPanel.add(itemNumberJLabel);				String string = String.valueOf(itemNumberInd);				if (itemNumberInd < 10) {					((JLabel) (dataItemNumberJPanel.getComponent(0))).setText("  " + string + ".");				} else if (itemNumberInd < 100) {					((JLabel) (dataItemNumberJPanel.getComponent(0))).setText(" " + string + ".");				} else {					((JLabel) (dataItemNumberJPanel.getComponent(0))).setText(string + ".");				}				((JLabel) (dataItemNumberJPanel.getComponent(0))).setVisible(false);				existingTemplatePageJPanel.add(dataCellItemJPanel);				existingTemplatePageNumbersJPanel.add(dataItemNumberJPanel);				itemNumberInd++;			}		}		JPanel[] returnJPanels = { existingTemplatePageJPanel, existingTemplatePageNumbersJPanel };		return returnJPanels;	}	private JPanel createDataCellItemJPanel(int sectionNumber, int pageNumber, int itemNumber) {		Vector dataCell = ((Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).elementAt(pageNumber))).elementAt(itemNumber)));		Vector itemAttributes = ((Vector) (dataCell.elementAt(1)));		JPanel itemJPanel = new JPanel(new GridBagLayout());		String description = ((String) (itemAttributes.elementAt(0)));		String humanReadableDatatype = ((String) (itemAttributes.elementAt(1)));		String elementDataType = ((String) (itemAttributes.elementAt(2)));		System.out.println("elementDataType: " + elementDataType);		boolean isRequiredField = ((Boolean) (itemAttributes.elementAt(3)));		String orientation = ((String) (itemAttributes.elementAt(4)));		String fontType = ((String) (itemAttributes.elementAt(5)));		int fontSize = ((Integer) (itemAttributes.elementAt(6)));		boolean isItemBoxBordered = ((Boolean) (itemAttributes.elementAt(7)));		int expectedLengthIfStringData = ((Integer) (itemAttributes.elementAt(8)));		int leftMargin = ((Integer) (itemAttributes.elementAt(9)));		int rightMargin = ((Integer) (itemAttributes.elementAt(10)));		int topMargin = ((Integer) (itemAttributes.elementAt(11)));		int bottomMargin = ((Integer) (itemAttributes.elementAt(12)));		String itemType = ((String) (itemAttributes.elementAt(13)));		int boundsX = ((Rectangle) (itemAttributes.elementAt(14))).x;		int boundsY = ((Rectangle) (itemAttributes.elementAt(14))).y;		int boundsWidth = ((Rectangle) (itemAttributes.elementAt(14))).width;		int boundsHeight = ((Rectangle) (itemAttributes.elementAt(14))).height;		itemJPanel.setBounds(boundsX, boundsY, boundsWidth, boundsHeight);		GridBagConstraints newDataItemPanelConstraints = new GridBagConstraints();		newDataItemPanelConstraints.gridy = 0;		newDataItemPanelConstraints.gridx = 0;		newDataItemPanelConstraints.weightx = 1;		newDataItemPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		if (itemType.equals("orderItem")) {			itemJPanel.setBackground(unprocessedFieldHighlightColor);			String hL7Message = ((String) (((Vector) (dataCell.elementAt(0))).elementAt(1)));			int activityOrderPanelBoundsY;			boolean addedOrderItemToChart = false;			Font activityOrderFont = new Font("Electron", Font.BOLD, 16);			JPanel activityOrderPusherJPanel = new JPanel();			JPanel activityOrderHeaderJPanel = new JPanel(new GridBagLayout());			JLabel activityOrderHeaderAndTimestampJLabel = new JLabel();			System.out.println("createDataCellItemJPanel(" + sectionNumber + ", " + pageNumber + ", " + itemNumber + ")");			int ind = 0;			while (ind < ((Vector) (dataCell.elementAt(0))).size()) {				System.out.println("    dataCell.elementAt(0).elementAt(" + ind + "):" + (((Vector) (dataCell.elementAt(0))).elementAt(ind)));				ind++;			}			ind = 0;			while (ind < ((Vector) (dataCell.elementAt(1))).size()) {				System.out.println("    dataCell.elementAt(1).elementAt(" + ind + "):" + (((Vector) (dataCell.elementAt(1))).elementAt(ind)));				ind++;			}			ind = 0;			while (ind < ((Vector) (dataCell.elementAt(2))).size()) {				System.out.println("    dataCell.elementAt(2):");				System.out.println("        status dataCell.elementAt(2).elementAt(" + ind + ").elementAt(0):" + (((Vector) (((Vector) (dataCell.elementAt(2))).elementAt(ind))).elementAt(0)));				System.out.println("        timestamp dataCell.elementAt(2).elementAt(" + ind + ").elementAt(1):" + (((Vector) (((Vector) (dataCell.elementAt(2))).elementAt(ind))).elementAt(1)));				System.out.println("        userID dataCell.elementAt(2).elementAt(" + ind + ").elementAt(2):" + (((Vector) (((Vector) (dataCell.elementAt(2))).elementAt(ind))).elementAt(2)));				System.out.println("        fullUserName dataCell.elementAt(2).elementAt(" + ind + ").elementAt(3):" + (((Vector) (((Vector) (dataCell.elementAt(2))).elementAt(ind))).elementAt(3)));				ind++;			}			String itemProcessingStatus = ((String) ((((Vector) (((Vector) (dataCell.elementAt(2))).elementAt(0))).elementAt(0))));			String activityTimestamp = ((String) ((((Vector) (((Vector) (dataCell.elementAt(2))).elementAt(0))).elementAt(1))));			String userID2 = ((String) ((((Vector) (((Vector) (dataCell.elementAt(2))).elementAt(0))).elementAt(2))));			String fullUserName = ((String) ((((Vector) (((Vector) (dataCell.elementAt(2))).elementAt(0))).elementAt(3))));			String facility = ((String) ((((Vector) (((Vector) (dataCell.elementAt(2))).elementAt(0))).elementAt(4))));			String userID = ((String) ((((Vector) (((Vector) (dataCell.elementAt(2))).elementAt(0))).elementAt(5))));			JLabel activityProviderAndFacilityJLabel = new JLabel("Provider: " + fullUserName + ";  " + "Facility: " + Access.getUser(userID, "facility"));			JLabel activityStatusJLabel = new JLabel("Order status: " + ((String) (((Vector) (((Vector) (dataCell.elementAt(2))).elementAt(0))).elementAt(0))));			JLabel medicallyEncodedActivityJLabel = new JLabel("Medical code: " + ((String) (((Vector) (dataCell.elementAt(1))).elementAt(2))).replace("|", ", "));			GridBagConstraints activityOrderPanelConstraints = new GridBagConstraints();			GridBagConstraints newActivityOrderHeaderPanelConstraints = new GridBagConstraints();			activityOrderHeaderAndTimestampJLabel.setFont(activityOrderFont);			activityProviderAndFacilityJLabel.setFont(activityOrderFont);			activityStatusJLabel.setFont(activityOrderFont);			medicallyEncodedActivityJLabel.setFont(activityOrderFont);			activityOrderHeaderJPanel.setBorder(new MatteBorder(0, 0, 1, 0, new Color(85, 85, 85)));			itemJPanel.setBorder(new LineBorder(new Color(85, 85, 85), 1));			activityOrderPusherJPanel.setOpaque(false);			activityOrderHeaderJPanel.setOpaque(false);			newActivityOrderHeaderPanelConstraints.anchor = GridBagConstraints.WEST;			activityOrderHeaderJPanel.add(activityOrderHeaderAndTimestampJLabel, newActivityOrderHeaderPanelConstraints);			newActivityOrderHeaderPanelConstraints.gridy = 1;			activityOrderHeaderJPanel.add(activityProviderAndFacilityJLabel, newActivityOrderHeaderPanelConstraints);			newActivityOrderHeaderPanelConstraints.gridy = 2;			activityOrderHeaderJPanel.add(activityStatusJLabel, newActivityOrderHeaderPanelConstraints);			newActivityOrderHeaderPanelConstraints.gridy = 3;			activityOrderHeaderJPanel.add(medicallyEncodedActivityJLabel, newActivityOrderHeaderPanelConstraints);			activityOrderPanelConstraints.anchor = GridBagConstraints.WEST;			activityOrderPanelConstraints.gridwidth = 40;			activityOrderPanelConstraints.insets = new Insets(0, 6, 0, 6);			itemJPanel.add(activityOrderHeaderJPanel, activityOrderPanelConstraints);			activityOrderPanelConstraints.gridy = 1;			activityOrderPanelConstraints.gridwidth = 1;			if (elementDataType.startsWith("RXNCONSO09072010")) {				itemJPanel.setBackground(unprocessedFieldHighlightColor);				activityOrderHeaderAndTimestampJLabel.setText("Prescription ordered " + activityTimestamp);				JLabel prescriptionOrderDrugTextFieldJLabel = new JLabel("Drug: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(1))));				int indy = 0;				while (indy < ((Vector) (dataCell.elementAt(0))).size()) {					System.out.println(indy + ": " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(indy))));					indy++;				}				JLabel prescriptionOrderDispenseAndRefillsAndVoidDateTextFieldJLabel = new JLabel("Dispense: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(2))) + ";  " + "Refills: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(4))) + ";  " + "Void date: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(5))));				JLabel prescriptionOrderSignatureTextFieldJLabel = new JLabel("Signature: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(3))));				JLabel prescriptionOrderAlertTextFieldJLabel = new JLabel("Alert: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(6))));				JLabel prescriptionOrderCommentTextFieldJLabel = new JLabel("Comment: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(7))));				JLabel prescriptionOrderDispenseAsWrittenJLabel = new JLabel("Dispense as written: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(8))));				JLabel prescriptionOrderPatientReportedJLabel = new JLabel("Patient reported: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(9))));				JLabel prescriptionOrderPharmacyTextFieldJLabel = new JLabel("Pharmacy: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(10))));				prescriptionOrderDrugTextFieldJLabel.setFont(activityOrderFont);				prescriptionOrderDispenseAndRefillsAndVoidDateTextFieldJLabel.setFont(activityOrderFont);				prescriptionOrderSignatureTextFieldJLabel.setFont(activityOrderFont);				prescriptionOrderAlertTextFieldJLabel.setFont(activityOrderFont);				prescriptionOrderCommentTextFieldJLabel.setFont(activityOrderFont);				prescriptionOrderDispenseAsWrittenJLabel.setFont(activityOrderFont);				prescriptionOrderPatientReportedJLabel.setFont(activityOrderFont);				prescriptionOrderPharmacyTextFieldJLabel.setFont(activityOrderFont);				itemJPanel.add(prescriptionOrderDrugTextFieldJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridy = 2;				itemJPanel.add(prescriptionOrderDispenseAndRefillsAndVoidDateTextFieldJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridy = 3;				itemJPanel.add(prescriptionOrderAlertTextFieldJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridy = 4;				itemJPanel.add(prescriptionOrderCommentTextFieldJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridy = 5;				itemJPanel.add(prescriptionOrderDispenseAsWrittenJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridx = 1;				activityOrderPanelConstraints.insets = new Insets(0, 12, 0, 0);				itemJPanel.add(prescriptionOrderPatientReportedJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridy = 6;				activityOrderPanelConstraints.gridx = 0;				activityOrderPanelConstraints.insets = new Insets(0, 6, 0, 0);				itemJPanel.add(prescriptionOrderPharmacyTextFieldJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridy = 7;				itemJPanel.add(prescriptionOrderSignatureTextFieldJLabel, activityOrderPanelConstraints);				enablePrescriptionOrder(false);			} else if (elementDataType.startsWith("LOINC2.32")) {				itemJPanel.setBackground(unprocessedFieldHighlightColor);				activityOrderHeaderAndTimestampJLabel.setText("Observation ordered " + activityTimestamp);				JLabel observationAxisComponentContentTextAreaJLabel = new JLabel("Component: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(1))));				JLabel observationAxisPropertyContentJLabel = new JLabel("Property: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(2))));				JLabel observationAxisTimeAspectContentJLabel = new JLabel("Time aspect: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(3))));				JLabel observationAxisSystemContentJLabel = new JLabel("System: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(4))));				JLabel observationAxisScaletypeContentJLabel = new JLabel("Scaletype: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(5))));				JLabel observationAxisMethodContentJLabel = new JLabel("Method: " + ((String) (((Vector) (dataCell.elementAt(0))).elementAt(6))));				observationAxisComponentContentTextAreaJLabel.setFont(activityOrderFont);				observationAxisPropertyContentJLabel.setFont(activityOrderFont);				observationAxisTimeAspectContentJLabel.setFont(activityOrderFont);				observationAxisSystemContentJLabel.setFont(activityOrderFont);				observationAxisScaletypeContentJLabel.setFont(activityOrderFont);				observationAxisMethodContentJLabel.setFont(activityOrderFont);				itemJPanel.add(observationAxisComponentContentTextAreaJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridy = 2;				itemJPanel.add(observationAxisPropertyContentJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridy = 3;				itemJPanel.add(observationAxisTimeAspectContentJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridy = 4;				itemJPanel.add(observationAxisSystemContentJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridy = 5;				itemJPanel.add(observationAxisScaletypeContentJLabel, activityOrderPanelConstraints);				activityOrderPanelConstraints.gridy = 6;				itemJPanel.add(observationAxisMethodContentJLabel, activityOrderPanelConstraints);				enableLOINCOrderJPanel(false);			} else if (elementDataType.startsWith("CPT2009")) {				itemJPanel.setBackground(Color.WHITE);				activityOrderHeaderAndTimestampJLabel.setText("Procedure ordered " + activityTimestamp);				JLabel proceduralJLabel = new JLabel("Procedure: " + hL7Message);				proceduralJLabel.setFont(activityOrderFont);				itemJPanel.add(proceduralJLabel, activityOrderPanelConstraints);				enableProceduralOrderJPanel(false);			} else if (elementDataType.startsWith("ICD10")) {				itemJPanel.setBackground(Color.WHITE);				activityOrderHeaderAndTimestampJLabel.setText("Diagnosis ordered " + activityTimestamp);				JLabel diagnosticJLabel = new JLabel("Diagnosis: " + hL7Message);				diagnosticJLabel.setFont(activityOrderFont);				itemJPanel.add(diagnosticJLabel, activityOrderPanelConstraints);				enableDiagnosticOrderJPanel(false);			}			activityOrderPanelConstraints.gridy = activityOrderPanelConstraints.gridy + 1;			activityOrderPanelConstraints.gridx = 2;			activityOrderPanelConstraints.weighty = 1;			activityOrderPanelConstraints.weightx = 1;			activityOrderPanelConstraints.insets = new Insets(0, 0, 0, 0);			itemJPanel.add(activityOrderPusherJPanel, activityOrderPanelConstraints);		} else {			if (humanReadableDatatype.equals("header")) {				itemJPanel.setBackground(Color.WHITE);				JTextArea pageHeaderJTextArea = new JTextArea(description + " ");				JTextArea pageHeaderSectionAndPageJTextArea = null;				if (Integer.valueOf(sectionNumber) == 0) {					pageHeaderSectionAndPageJTextArea = new JTextArea("Chart cover page " + pageNumber + ".");				} else if (Integer.valueOf(sectionNumber) == 1) {					pageHeaderSectionAndPageJTextArea = new JTextArea("Demographics page " + pageNumber + ".");				} else if (Integer.valueOf(sectionNumber) == 2) {					pageHeaderSectionAndPageJTextArea = new JTextArea("Activities page " + pageNumber + ".");				} else if (Integer.valueOf(sectionNumber) == 3) {					pageHeaderSectionAndPageJTextArea = new JTextArea("History page " + pageNumber + ".");				} else if (Integer.valueOf(sectionNumber) == 4) {					pageHeaderSectionAndPageJTextArea = new JTextArea("Insurance page " + pageNumber + ".");				}				pageHeaderJTextArea.setEditable(false);				pageHeaderSectionAndPageJTextArea.setEditable(false);				pageHeaderJTextArea.setFont(new Font(fontType, Font.BOLD, fontSize));				pageHeaderSectionAndPageJTextArea.setFont(new Font(fontType, Font.BOLD, fontSize));				itemJPanel.setBorder(new MatteBorder(topMargin, leftMargin, bottomMargin, rightMargin, Color.WHITE));				newDataItemPanelConstraints.weightx = 1;				itemJPanel.add(pageHeaderJTextArea, newDataItemPanelConstraints);				newDataItemPanelConstraints.weightx = 0;				newDataItemPanelConstraints.gridx = 1;				itemJPanel.add(pageHeaderSectionAndPageJTextArea, newDataItemPanelConstraints);			} else if (humanReadableDatatype.equals("text")) {				itemJPanel.setBackground(Color.WHITE);				newDataItemPanelConstraints.weightx = 0;				newDataItemPanelConstraints.fill = GridBagConstraints.NONE;				itemJPanel.add(new JTextArea(description + " "), newDataItemPanelConstraints);				((JTextArea) (itemJPanel.getComponent(0))).setOpaque(true);				((JTextArea) (itemJPanel.getComponent(0))).setBackground(Color.WHITE);				((JTextArea) (itemJPanel.getComponent(0))).setFont(new Font(fontType, Font.BOLD, fontSize));				((JTextArea) (itemJPanel.getComponent(0))).setBorder(new MatteBorder(0, 0, 4, 0, new Color(255, 255, 255, 0)));				((JTextArea) (itemJPanel.getComponent(0))).setEditable(false);				if (orientation.equals("left to right")) {					newDataItemPanelConstraints.gridx = 1;				} else {					newDataItemPanelConstraints.gridy = 1;				}				newDataItemPanelConstraints.weightx = 1;				newDataItemPanelConstraints.fill = GridBagConstraints.HORIZONTAL;				if (elementDataType.endsWith("TS")) {					String itemStructLocationString = String.valueOf(sectionNumber) + "|" + String.valueOf(pageNumber) + "|" + String.valueOf(itemNumber);					itemJPanel.add(Device.device.workspace.systemWindow.hL7TSFromCalendarPanel(new Font(fontType, Font.BOLD, fontSize), isRequiredField, "chartingWindow", itemStructLocationString), newDataItemPanelConstraints);					highlightDataCellDisplayItem(((JPanel) (itemJPanel.getComponent(1))), dataCell);					((JPanel) (itemJPanel.getComponent(1))).setName("dataItemContainer|" + sectionNumber + "|" + pageNumber + "|" + itemNumber);				} else {					itemJPanel.add(new JTextArea(), newDataItemPanelConstraints);					((JTextArea) (itemJPanel.getComponent(1))).setColumns(expectedLengthIfStringData);					((JTextArea) (itemJPanel.getComponent(1))).setBorder(new CompoundBorder(new MatteBorder(0, 0, 2, 2, new Color(255, 255, 255, 0)), new MatteBorder(0, 0, 2, 0, Color.BLACK)));					((JTextArea) (itemJPanel.getComponent(1))).setFont(new Font(fontType, Font.BOLD, fontSize));					((JTextArea) (itemJPanel.getComponent(1))).setName("dataItemContainer|" + sectionNumber + "|" + pageNumber + "|" + itemNumber);					((JTextArea) (itemJPanel.getComponent(1))).addFocusListener(this);					highlightDataCellDisplayItem(((JTextArea) (itemJPanel.getComponent(1))), dataCell);					if (((String) ((((Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).elementAt(pageNumber))).elementAt(itemNumber))).elementAt(0)))) != null) {						((JTextArea) (itemJPanel.getComponent(1))).setText(((String) ((((Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).elementAt(pageNumber))).elementAt(itemNumber))).elementAt(0)))));					}				}				if (Access.isUserLoggedIn && ((sectionNumber == 1 && Access.getUser(Access.loggedOnUserID, "chartsDemographicsAuthorization").equals("view only")) || (sectionNumber == 4 && Access.getUser(Access.loggedOnUserID, "chartsInsuranceAuthorization").equals("view only")))) {					((JComponent) (itemJPanel.getComponent(1))).setEnabled(false);				}			} else if (humanReadableDatatype.equals("image")) {				itemJPanel.setBackground(Color.WHITE);				itemJPanel.add(new JTextArea(description + " "), newDataItemPanelConstraints);				((JTextArea) (itemJPanel.getComponent(0))).setOpaque(true);				((JTextArea) (itemJPanel.getComponent(0))).setBackground(Color.WHITE);				((JTextArea) (itemJPanel.getComponent(0))).setFont(new Font(fontType, Font.BOLD, fontSize));				((JTextArea) (itemJPanel.getComponent(0))).setBorder(new MatteBorder(0, 0, 4, 0, new Color(255, 255, 255, 0)));				((JTextArea) (itemJPanel.getComponent(0))).setEditable(false);				if (orientation.equals("left to right")) {					newDataItemPanelConstraints.gridx = 1;				} else {					newDataItemPanelConstraints.gridy = 1;				}				itemJPanel.add(new JPanel(new GridBagLayout()), newDataItemPanelConstraints);				((JPanel) (itemJPanel.getComponent(1))).add(new JLabel("Paste image here."));				((JPanel) (itemJPanel.getComponent(1))).setForeground(Color.GRAY);				((JPanel) (itemJPanel.getComponent(1))).setSize(new Dimension(200, 200));				((JPanel) (itemJPanel.getComponent(1))).setPreferredSize(new Dimension(200, 200));				((JPanel) (itemJPanel.getComponent(1))).setBorder(new BevelBorder(BevelBorder.LOWERED));				((Container) (itemJPanel.getComponent(1))).setName("dataItemContainer|" + sectionNumber + "|" + pageNumber + "|" + itemNumber);				((Container) (itemJPanel.getComponent(1))).addFocusListener(this);				if (Access.isUserLoggedIn && ((sectionNumber == 1 && Access.getUser(Access.loggedOnUserID, "chartsDemographicsAuthorization").equals("view only")) || (sectionNumber == 4 && Access.getUser(Access.loggedOnUserID, "chartsInsuranceAuthorization").equals("view only")))) {				}				if (!isRequiredField) {					((JPanel) (itemJPanel.getComponent(1))).setBackground(new Color(192, 192, 255));				} else {					((JPanel) (itemJPanel.getComponent(1))).setBackground(ChartingWindow.importantFieldHighlightColor);				}				if (((String) ((((Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).elementAt(pageNumber))).elementAt(itemNumber))).elementAt(0)))) != null) {					int graphicsX = 0;					int graphicsY = 0;					int graphicsWidth = 0;					int graphicsHeight = 0;					Color graphicsColor = Color.WHITE;					ImageObserver imageObserver = null;					((JPanel) (itemJPanel.getComponent(1))).getGraphics().drawImage(((Image) ((((Vector) (((Vector) (((Vector) (((Vector) (Access.patientDataStruct.elementAt(1))).elementAt(sectionNumber))).elementAt(pageNumber))).elementAt(itemNumber))).elementAt(0)))), graphicsX, graphicsX, graphicsWidth, graphicsHeight, graphicsColor, imageObserver);				}			} else if (humanReadableDatatype.equals("audio")) {				itemJPanel.setBackground(Color.WHITE);				itemJPanel.add(new JTextArea(description + " "), newDataItemPanelConstraints);				((JTextArea) (itemJPanel.getComponent(0))).setOpaque(true);				((JTextArea) (itemJPanel.getComponent(0))).setBackground(Color.WHITE);				((JTextArea) (itemJPanel.getComponent(0))).setFont(new Font(fontType, Font.BOLD, fontSize));				((JTextArea) (itemJPanel.getComponent(0))).setBorder(new MatteBorder(0, 0, 4, 0, new Color(255, 255, 255, 0)));				((JTextArea) (itemJPanel.getComponent(0))).setEditable(false);				if (orientation.equals("left to right")) {					newDataItemPanelConstraints.gridx = 1;				} else {					newDataItemPanelConstraints.gridy = 1;				}				itemJPanel.add(new JPanel(new GridBagLayout()), newDataItemPanelConstraints);				((JPanel) (itemJPanel.getComponent(1))).add(new JLabel("Paste audio here."));				((JPanel) (itemJPanel.getComponent(1))).setSize(new Dimension(200, 80));				((JPanel) (itemJPanel.getComponent(1))).setPreferredSize(new Dimension(200, 80));				((JPanel) (itemJPanel.getComponent(1))).setBorder(new BevelBorder(BevelBorder.RAISED));				((JPanel) (itemJPanel.getComponent(1))).setOpaque(true);				((Container) (itemJPanel.getComponent(1))).setName("dataItemContainer|" + sectionNumber + "|" + pageNumber + "|" + itemNumber);				((Container) (itemJPanel.getComponent(1))).addFocusListener(this);				if (Access.isUserLoggedIn && ((sectionNumber == 1 && Access.getUser(Access.loggedOnUserID, "chartsDemographicsAuthorization").equals("view only")) || (sectionNumber == 4 && Access.getUser(Access.loggedOnUserID, "chartsInsuranceAuthorization").equals("view only")))) {				}				if (!isRequiredField) {					((JPanel) (itemJPanel.getComponent(1))).setBackground(new Color(156, 156, 176));				} else {					((JPanel) (itemJPanel.getComponent(1))).setBackground(ChartingWindow.importantFieldHighlightColor);				}			} else if (humanReadableDatatype.equals("video")) {				itemJPanel.setBackground(Color.WHITE);				itemJPanel.add(new JTextArea(description + " "), newDataItemPanelConstraints);				((JTextArea) (itemJPanel.getComponent(0))).setOpaque(true);				((JTextArea) (itemJPanel.getComponent(0))).setBackground(Color.WHITE);				((JTextArea) (itemJPanel.getComponent(0))).setFont(new Font(fontType, Font.BOLD, fontSize));				((JTextArea) (itemJPanel.getComponent(0))).setBorder(new MatteBorder(0, 0, 4, 0, new Color(255, 255, 255, 0)));				((JTextArea) (itemJPanel.getComponent(0))).setEditable(false);				if (orientation.equals("left to right")) {					newDataItemPanelConstraints.gridx = 1;				} else {					newDataItemPanelConstraints.gridy = 1;				}				itemJPanel.add(new JPanel(new GridBagLayout()), newDataItemPanelConstraints);				((JPanel) (itemJPanel.getComponent(1))).add(new JLabel("Paste video here."));				((JPanel) (itemJPanel.getComponent(1))).setSize(new Dimension(364, 205));				((JPanel) (itemJPanel.getComponent(1))).setPreferredSize(new Dimension(364, 205));				((JPanel) (itemJPanel.getComponent(1))).setBorder(new BevelBorder(BevelBorder.RAISED));				((JPanel) (itemJPanel.getComponent(1))).setOpaque(true);				if (Access.isUserLoggedIn && ((sectionNumber == 1 && Access.getUser(Access.loggedOnUserID, "chartsDemographicsAuthorization").equals("view only")) || (sectionNumber == 4 && Access.getUser(Access.loggedOnUserID, "chartsInsuranceAuthorization").equals("view only")))) {				}				((Container) (itemJPanel.getComponent(1))).setName("dataItemContainer|" + sectionNumber + "|" + pageNumber + "|" + itemNumber);				((Container) (itemJPanel.getComponent(1))).addFocusListener(this);				if (!isRequiredField) {					((JPanel) (itemJPanel.getComponent(1))).setBackground(Color.BLACK);				} else {					((JPanel) (itemJPanel.getComponent(1))).setBackground(ChartingWindow.importantFieldHighlightColor);				}			}		}		if (isItemBoxBordered) {			itemJPanel.setBorder(new CompoundBorder(new MatteBorder(topMargin, leftMargin, bottomMargin, rightMargin, new Color(255, 255, 255, 0)), new LineBorder(Color.BLACK, 1)));		} else {			itemJPanel.setBorder(new MatteBorder(topMargin, leftMargin, bottomMargin, rightMargin, new Color(255, 255, 255, 0)));		}		return itemJPanel;	}	private static String lastDot(String string) {		if (string != null && !string.equals("") && !string.equals(".")) {			if (string.charAt(string.length() - 1) == '.') {				return "";			} else {				return ".";			}		} else {			return "";		}	}	ActionListener flashTalkbackIndicator = new ActionListener() {		public void actionPerformed(ActionEvent evt) {			if (flashTalkbackInd < 8 | (flashTalkbackInd > 14 && flashTalkbackInd < 22)) {				flashMaskTranslucency = flashMaskTranslucency - 36;				talkbackIconTranslucentCoverJPanel.setBackground(new Color(255, 255, 255, flashMaskTranslucency));				talkBackIconBaseJPanel.validate();				talkBackIconBaseJPanel.repaint();			} else {				flashMaskTranslucency = flashMaskTranslucency + 36;				talkbackIconTranslucentCoverJPanel.setBackground(new Color(255, 255, 255, flashMaskTranslucency));				talkBackIconBaseJPanel.validate();				talkBackIconBaseJPanel.repaint();			}			flashTalkbackInd++;			if (flashTalkbackInd > 28) {				flashTalkbackTimer.stop();			}		}	};	private boolean syncAppointmentCalendarWithTalkback(JTextField activeCalendarField) {		String activeCalendarFieldText = activeCalendarField.getText();		String activeCalendarFieldName = activeCalendarField.getName();		boolean valideChange = false;		if (activeCalendarFieldName.startsWith("timeStampCalendarMonthJTextField")) {			int monthOrdinal = 0;			while (!valideChange && monthOrdinal < 12) {				if (month[monthOrdinal].toUpperCase().startsWith(activeCalendarFieldText.toUpperCase())) {					activeCalendar.roll(activeCalendar.MONTH, monthOrdinal - activeCalendar.get(activeCalendar.MONTH));					activeCalendarMonthJTextField.setBackground(Color.WHITE);					valideChange = true;				}				monthOrdinal++;			}			if (!valideChange) {				activeCalendarMonthJTextField.setBackground(PracticeWindow.invalidePinkFieldColor);				addTalkbackText("Please enter a valid month.", null, true);			}		} else if (activeCalendarFieldName.startsWith("timeStampCalendarDayOfMonthJTextField")) {			try {				if (0 < Integer.parseInt(activeCalendarFieldText) && Integer.parseInt(activeCalendarFieldText) < activeCalendar.getActualMaximum(activeCalendar.DAY_OF_MONTH) + 1) {					activeCalendar.roll(activeCalendar.DAY_OF_YEAR, Integer.parseInt(activeCalendarFieldText) - activeCalendar.get(activeCalendar.DAY_OF_MONTH));					activeCalendarDayOfMonthJTextField.setBackground(Color.WHITE);					valideChange = true;				} else if (Integer.parseInt(activeCalendarFieldText) > activeCalendar.getActualMaximum(activeCalendar.DAY_OF_MONTH)) {					addTalkbackText("The day of month is to large for " + month[activeCalendar.get(activeCalendar.MONTH)], null, true);				}			} catch (Exception ert) {				activeCalendarDayOfMonthJTextField.setBackground(PracticeWindow.invalidePinkFieldColor);				addTalkbackText("Please enter a valid day of the month", null, true);			}		} else if (activeCalendarFieldName.startsWith("timeStampCalendarYearJTextField")) {			try {				if (2011 < Integer.parseInt(activeCalendarFieldText) && Integer.parseInt(activeCalendarFieldText) < 2063) {					activeCalendar.add(activeCalendar.YEAR, Integer.parseInt(activeCalendarFieldText) - activeCalendar.get(activeCalendar.YEAR));					activeCalendarYearJTextField.setBackground(Color.WHITE);					valideChange = true;				}			} catch (Exception ert) {				activeCalendarYearJTextField.setBackground(PracticeWindow.invalidePinkFieldColor);				addTalkbackText("Please enter a valid year", null, true);			}		} else if (activeCalendarFieldName.startsWith("timeStampCalendarHourJTextField")) {			try {				if (activeCalendarAMPMJTextField.getText().equals("AM") || activeCalendarAMPMJTextField.getText().equals("PM")) {					if (-1 < Integer.parseInt(activeCalendarFieldText) && Integer.parseInt(activeCalendarFieldText) < 13) {						if (Integer.parseInt(activeCalendarFieldText) == 12) {							activeCalendar.set(activeCalendar.HOUR, 0);						} else {							activeCalendar.set(activeCalendar.HOUR, Integer.parseInt(activeCalendarFieldText));						}						activeCalendarMonthJTextField.setBackground(Color.WHITE);						valideChange = true;					} else {						activeCalendarHourJTextField.setBackground(PracticeWindow.invalidePinkFieldColor);						addTalkbackText("Please enter a valid from 0 to 12", null, true);					}				} else if (-1 < Integer.parseInt(activeCalendarFieldText) && Integer.parseInt(activeCalendarFieldText) < 25) {					activeCalendar.set(activeCalendar.HOUR_OF_DAY, Integer.parseInt(activeCalendarFieldText));					activeCalendarHourJTextField.setBackground(Color.WHITE);					valideChange = true;				} else {					activeCalendarHourJTextField.setBackground(PracticeWindow.invalidePinkFieldColor);					addTalkbackText("Please enter a valid 24-hour time in the hour field", null, true);				}			} catch (Exception ert) {				activeCalendarHourJTextField.setBackground(PracticeWindow.invalidePinkFieldColor);				addTalkbackText("Please enter a valid hour", null, true);			}		} else if (activeCalendarFieldName.startsWith("timeStampCalendarMinuteJTextField")) {			try {				if (-1 < Integer.parseInt(activeCalendarFieldText) && Integer.parseInt(activeCalendarFieldText) < 60) {					activeCalendar.set(activeCalendar.MINUTE, Integer.parseInt(activeCalendarFieldText));					activeCalendarMinuteJTextField.setBackground(Color.WHITE);					valideChange = true;				} else {					activeCalendarMinuteJTextField.setBackground(PracticeWindow.invalidePinkFieldColor);					addTalkbackText("Please enter a valid minute (0 to 59)", null, true);				}			} catch (Exception ert) {				activeCalendarMinuteJTextField.setBackground(PracticeWindow.invalidePinkFieldColor);				addTalkbackText("Please enter a valid minute (0 to 59)", null, true);			}		} else if (activeCalendarFieldName.startsWith("timeStampCalendarAmPmJTextField")) {			if (activeCalendarFieldText.equals("AM")) {				activeCalendar.set(activeCalendar.AM_PM, 0);				valideChange = true;			} else if (activeCalendarFieldText.equals("PM")) {				activeCalendar.set(activeCalendar.AM_PM, 1);				valideChange = true;			}		}		if (valideChange) {			rollAndFill(null, 0);		}		return valideChange;	}	public void rollAndFill(String componentName, int amountToRoll) {		if (null != componentName) {			int calendarObjectToRoll = -1;			if (componentName.contains("DayOfWeek")) {				calendarObjectToRoll = Calendar.DAY_OF_WEEK;			} else if (componentName.contains("CalendarMonth")) {				calendarObjectToRoll = Calendar.MONTH;			} else if (componentName.contains("CalendarDayOfMonth")) {				calendarObjectToRoll = Calendar.DAY_OF_MONTH;			} else if (componentName.contains("CalendarYear")) {				calendarObjectToRoll = Calendar.YEAR;			} else if (componentName.contains("CalendarHour")) {				calendarObjectToRoll = Calendar.HOUR;			} else if (componentName.contains("CalendarMinute")) {				calendarObjectToRoll = Calendar.MINUTE;			} else if (componentName.contains("CalendarAmPm")) {				calendarObjectToRoll = Calendar.AM_PM;			}			if (calendarObjectToRoll != -1) {				activeCalendar.roll(calendarObjectToRoll, amountToRoll);			}		}		activeCalendarDayOfWeekJTextField.setText(dayOfWeek[activeCalendar.get(Calendar.DAY_OF_WEEK) - 1]);		activeCalendarMonthJTextField.setText(month[activeCalendar.get(Calendar.MONTH)]);		activeCalendarDayOfMonthJTextField.setText(String.valueOf(activeCalendar.get(Calendar.DAY_OF_MONTH)));		activeCalendarYearJTextField.setText(String.valueOf(activeCalendar.get(Calendar.YEAR)));		if (activeCalendar.get(Calendar.HOUR) == 0) {			activeCalendarHourJTextField.setText("12");		} else {			if (String.valueOf(activeCalendar.get(Calendar.MINUTE)).length() < 2) {				activeCalendarHourJTextField.setText(" " + String.valueOf(activeCalendar.get(Calendar.HOUR)));			} else {				activeCalendarHourJTextField.setText(String.valueOf(activeCalendar.get(Calendar.HOUR)));			}		}		if (String.valueOf(activeCalendar.get(Calendar.MINUTE)).length() < 2) {			activeCalendarMinuteJTextField.setText("0" + String.valueOf(activeCalendar.get(Calendar.MINUTE)));		} else {			activeCalendarMinuteJTextField.setText(String.valueOf(activeCalendar.get(Calendar.MINUTE)));		}		activeCalendarAMPMJTextField.setText(aMPM[activeCalendar.get(Calendar.AM_PM)]);		if (activeCalendarMonthJTextField.getBackground().equals(PracticeWindow.invalidePinkFieldColor)) {			activeCalendarMonthJTextField.setBackground(Color.WHITE);			addTalkbackText("The incorrect month field was changed back to it's original value.", null, true);		} else if (activeCalendarDayOfMonthJTextField.getBackground().equals(PracticeWindow.invalidePinkFieldColor)) {			activeCalendarDayOfMonthJTextField.setBackground(Color.WHITE);			addTalkbackText("The incorrect day of the month was changed back to it's original value.", null, true);		} else if (activeCalendarYearJTextField.getBackground().equals(PracticeWindow.invalidePinkFieldColor)) {			activeCalendarYearJTextField.setBackground(Color.WHITE);			addTalkbackText("The incorrect year field was changed back to it's original value.", null, true);		} else if (activeCalendarHourJTextField.getBackground().equals(PracticeWindow.invalidePinkFieldColor)) {			activeCalendarHourJTextField.setBackground(Color.WHITE);			addTalkbackText("The incorrect hour field was changed back to it's original value.", null, true);		} else if (activeCalendarMinuteJTextField.getBackground().equals(PracticeWindow.invalidePinkFieldColor)) {			activeCalendarMinuteJTextField.setBackground(Color.WHITE);			addTalkbackText("The incorrect minute field was changed back to it's original value", null, true);		}	}	public void reSize() {		validate();		pack();		setSize(chartingWindowDimension);		repaint();	}	@Override	public void keyPressed(KeyEvent e) {		if (e.getComponent().getName().startsWith("timeStampCalendar")) {			if (e.getKeyCode() == 38) {				rollAndFill(e.getComponent().getName(), 1);			} else if (e.getKeyCode() == 40) {				rollAndFill(e.getComponent().getName(), -1);			}		}	}	@Override	public void keyReleased(KeyEvent arg0) {	}	@Override	public void keyTyped(KeyEvent arg0) {	}	public String getPatientInformation(String query) {		Vector patientIndexedInformation = PracticeWindow.getHumanReadablePatientIndexedInformation(Integer.parseInt(openChartID));		if (query.equals("patient name")) {			return (String) patientIndexedInformation.elementAt(0);		} else if (query.equals("patient birthdate")) {			return (String) patientIndexedInformation.elementAt(4);		} else if (query.equals("patient sex")) {			return (String) patientIndexedInformation.elementAt(5);		} else if (query.equals("patient race")) {			return (String) patientIndexedInformation.elementAt(6);		} else {			System.out.println("Critical error in chartingWindow.getPatientInformation(...): query not found");			return null;		}	}}// EOF